I setup GIT in a Windows and a Ubuntu. Both of them works well locally. Now I want to put some repository from Windows to Ubuntu. I think I can use 'git push' in the Windows, or use 'git clone' in the Ubuntu. But neither works.

When I use

git push -v xxx.xxx.xxx.xxx:/share/source/repo.git

At begining, I got an error:

The server's host key is not cached in the registry. You have no guarantee that the server is the computer you think it is.

After I used putty to save the host key, the error message disappeared. Then I got a

does not appear to be a git repository

error. After I modified the path to repository, the error message disappeared too. Now I get:

fatal: The remote end hung up unexpectedly

I didn't get enough information from the message.

So I want to check the git's log in both Windows and Ubuntu side to check what happened. But after googling 'git log', all entries are about git commit history. that's not what I need.

Can anyone shred me some light on this?

  • It would also help if you posted which commands you used exactly. It seems that you just followed the wrong procedure, but we can't help you without additional information.
    – slhck
    May 25, 2011 at 9:32
  • what does git remote say?
    – Sathyajith Bhat
    May 25, 2011 at 10:16
  • @slhck, I modified my original post. I use 'git push'. @Sathya, 'git remote' output nothing. Thanks.
    – Landy
    May 25, 2011 at 23:46
  • 1
    Use git push -v to get verbose output, then please post the exact command you are using as well as the output from this command. May 26, 2011 at 1:27
  • @Stephen Jennings, even I add the -v option, it still reports only 'Fatal: The remote end hung up expectedly.' Thanks. My command is 'git push -v xxx.xxx.xxx.xxx:/share/source/repo.git'
    – Landy
    May 26, 2011 at 5:12

1 Answer 1


Using a remote URL of the form [address]:/path/to/repo.git implies you are using SSH to connect. However, you haven't supplied a username. I'm not sure how Git behaves in this situation, but it makes me think you might not have write-access.

Perhaps try using a URL of the following form to specify the username with which to connect to Ubuntu:


Perhaps try cloning from that repository to see if you even have read access. Go into a new empty folder and run one of:

git clone [address]:/path/to/repo.git .
git clone [user]@[address]:/path/to/repo.git .

If you can clone the remote repository, then you know you have read access

  • thank you. Finally I found the root reason for remote end hung up unexpectedly. I generated the ssh key in the windows using puttygen.exe. After reading this post - andremolnar.com/…, I use ssh-keygen in the ubuntu to generate a new ssh keys. Everything is fine now. I don't know the reason. It just works. Thank you again for your kindly help.
    – Landy
    Jun 3, 2011 at 10:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.