arash moeen
arash moeen

Reputation: 4693

Why git clone from remote machine says it is not a git repository?

On the remote machine (ubuntu 12.04 ) I created a test/ folder in my repo folder and inside the folder I used:

git init

Running command ll inside the test folder will show me that there's .git folder inside test.
Now I want to clone remotely from this machine on my own machine (ubuntu 12.04) using:

git clone ssh://[email protected]/Documents/repos/test

But I get the following error:

Cloning into 'test'...
[email protected]'s password: //I enter password then...
fatal: '/Documents/repos/test' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

I'm quite new to using git and can't think of any reason that it shouldn't work.
How would you explain that error message?

Upvotes: 1

Views: 138

Answers (1)

VonC
VonC

Reputation: 1324268

That would be explained by the fact a normal Ubuntu distribution does not have a /Documents

http://1.bp.blogspot.com/-vuqCDlnP_Rc/TfLv5Ql6YmI/AAAAAAAAAKE/g8oVglafrVY/s640/directory.jpg

(See for instance "The directory Tree")

Try instead the full path (check it with pwd -P) of your non-bare repo:

git clone ssh://[email protected]/home/rahil-p/Documents/repos/test

Upvotes: 1

Related Questions