volt
volt

Reputation: 473

git clone "does not appear to be a git repository"

I get an error when I try to clone a remote git that is outside HOME of the git user.

Cloning into test...
fatal: '/media/raid/repo/test.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

I'm not sure why I get this error, what I trying to do is to move the git to a another disk. At the moment the git resides in my git users HOME and I have no problem to clone from that git when it resides in users space. I have tried to access the other disk with softlinks and directly by mount path but it's no success.

Running Ubuntu 12.04 on the git server, the git user have ssh access.

Here are some basic tests, on my raid disk I have a copy if test.git.

/home/git [git user's home]
lrwxrwxrwx 1 git  git    11 Jan  8 21:22 tst.git -> test.git//
drwxr-xr-x 7 git  git  4096 Jan  8 21:20 test.git/
lrwxrwxrwx 1 git  git    18 Jan  7 06:48 repo -> /media/raid/repo//

/media/raid/repo [The preferred location]
drwxrwxr-x  7 git     git     4096 Jan  4 10:33 test.git/

OK  - git clone gitserver:/home/git/test.git
OK  - git clone gitserver:/home/git/tst.git
NOK - git clone gitserver:/home/git/repo/test.git
NOK - git clone gitserver:/media/raid/repo/test.git

Is this some basic Linux security that I missing or is this a git problem?

Upvotes: 2

Views: 5645

Answers (2)

volt
volt

Reputation: 473

Found the reason... Git user had no permission to access /media/raid, small mistake by me. So now I can soft link to raid and I'm able to access with this syntax:

git clone gitserver:repo/test.git

Still I find the error message rather strange.

Upvotes: 1

Daniel Uribe
Daniel Uribe

Reputation: 778

It seems your path is incomplete. Your path should be something like: /HOME/USER/media/raid/repo/test.git

Upvotes: 0

Related Questions