Day 22: Clone Git Repository on Storage Server

I have tried this task almost 6 to 7 times but getting failed why? I didn’t understand.
I used below commands.
sudo su - natasha
git clone /opt/beta.git /usr/src/kodekloudrepos
cd /usr/src/kodekloudrepos
git remote -v

output:

origin /opt/beta.git (fetch)
origin /opt/beta.git (push)

git status

If it says:

On branch master
No commits yet

After run above commands and submit the task it was failing.

Error is : - ‘/opt/beta.git’ git repository is not cloned under ‘/usr/src/kodekloudrepos/’ on Storage Server. —why coming this error anyone please help me.

Here you’re making a subtle error. The command you used to do the clone was:

git clone /opt/beta.git /usr/src/kodekloudrepos

This means: “take the /usr/src/kodekloudrepos directory, and turn it into a clone of /opt/beta.git”. But what they want you to do is to create a clone of the /opt/beta.git repo inside of that directory. For that, you want to do this:

cd /usr/src/kodekloudrepos
git clone /opt/beta.git

This will create a directory of /usr/src/kodekloudrepos/beta, which is what they’re looking to find. You’re create the clone one level higher, as /usr/src/kodekloudrepos.

3 Likes