Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
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 '11 at 9:32
    
what does git remote say? –  Sathya May 25 '11 at 10:16
    
@slhck, I modified my original post. I use 'git push'. @Sathya, 'git remote' output nothing. Thanks. –  Landy May 25 '11 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. –  Stephen Jennings May 26 '11 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 '11 at 5:12
add comment

1 Answer

up vote 0 down vote accepted

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:

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

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

share|improve this answer
    
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 '11 at 10:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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