16

I just installed GIT in my CentOS Linux server and configured it. When I create a new repository using git init it works fine and gives output of the command also.
But whenever I try to clone the remote repository into my local computer folder it gives the following message:

fatal: '/public_html/repositories/git-test/.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

Has anyone come across this issue, what could be the reason?

user493313
  • 161
  • 1
  • 1
  • 5
  • 3
    can you give the full clone command that you're using to help further debug. – Nigel Nov 01 '10 at 09:12
  • You said "local" - does that mean you're cloning over a network? Does your login on the remote have the necessary privileges to read all of the files? (And I second Nigel's request for full information.) – Cascabel Nov 01 '10 at 13:35
  • This answer might help: http://stackoverflow.com/a/922566/327862 – Mukesh Chapagain Mar 24 '13 at 10:17

1 Answers1

11

Your path may be incomplete. Perhaps your full path should be something more like this: /home/USER/public_html/repositories/git-test.

kanaka
  • 70,845
  • 23
  • 144
  • 140
  • Thanks Kanaka for the answer, actually iam using both mysys GIT and Tortoise GIT for this purpose. Now i used the format "git@myhost.com:/public_html/repositories/git-test/". Then i created new user "git" and also added authorized public key for it in the .ssh file so that it can access the remote repo. Now when i try to perform to clone the remote repo in the local folder i get the error ""git no address associated with name". I think i am close to the solution but don't know what is the issue here. – user493313 Nov 03 '10 at 05:56
  • That might be a name resolution problem. Make sure that whatever you are using for `myhost.com` actually resolves from your local computer. Also, if you continue having problems can you update your question with the full command you are running and the actual error text. Thx – kanaka Nov 03 '10 at 13:59
  • Thanks! In my case, I was using a relative path like ../../other-repo. Using ~/other-repo instead worked. – CrazyPyro Feb 24 '11 at 19:47