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 have a remote GIT repository (ubuntu) and am working locally on a windows 7. I had this working nicely, and setup SSH keys. At some point in this process I seem to have disabled GIT/msysgit asking for passwords. I now have a new remote git repo (on ubuntu) without keys setup and it wont ask me for my password. I tried

git clone ssh://<user>:<pass>@<ip>:<myport>/mygitrepopath

and it doesnt work either. But I can use putty with the same credentials to log in.

Edit

To setup the keys, I generated the public/private keys with putty, and added the appropriate ones to the server and into pageant. I dont remember if I took any other steps :(

this is the message I get

Cloning into 'myhub'...
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.
The server's rsa2 key fingerprint is:
ssh-rsa blhablhablhjah
Connection abandoned.
fatal: The remote end hung up unexpectedly
share|improve this question

migrated from serverfault.com Dec 13 '12 at 2:45

This question came from our site for professional system and network administrators.

    
Explain the steps you took in making the authentication work with keys. You may have hit some check box "keys only". –  gertvdijk Dec 13 '12 at 0:58
    
thanks for the reply. I can't remember, I figured that was the issue but couldnt find where. I will update question with details –  neolaser Dec 13 '12 at 1:26
    
Certainly looks from the error like the connection is abandoned on account of not having the server's host key cached in the registry. Have you tried correcting that error?? –  Chris S Dec 13 '12 at 1:47
    
Yeah, it is trying to use a key. But I didnt create a key for it, I didnt for other repos... –  neolaser Dec 13 '12 at 2:15
    
Host key, SSH doesn't work without them. They're created automatically by sshd normally. Apparently it isn't in your registry. I'm not sure what ssh client git is using, but it looks like that client is rejecting the connection because it doesn't recognize the server your trying to connect to. Putty you say is working, and unless you're getting host key errors there too, Putty has the host key cached and is verifying it silently each time you connect. I don't use git, I use HG, but either way if you're a Putty user you should configure it for plink to avoid these issues. –  Chris S Dec 13 '12 at 2:38
add comment

2 Answers

Check if ~/.ssh and ~/.ssh/known_hosts are writable.

share|improve this answer
add comment

If you installed using PuTTY as your SSH provider, try these troubleshooting steps:

  1. Start PuTTY
  2. Connect to your git host:

    ssh user@ip -p port

  3. Confirm the host's signature/fingerprint

  4. Cancel the connection (CTRL-C)
  5. Done. git should be able to perform all operations regardless of shell now (regular Windows command prompt, msysgit, or cygwin)

(from http://drupal.org/node/1027094)

share|improve this answer
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.