GIT - msysgit不会要求输入密码

时间:2012-12-13 00:47:14

标签: git ssh msysgit

我有一个远程GIT存储库(ubuntu),我在Windows 7本地工作。我有这个工作很好,并设置SSH密钥。在这个过程的某个时刻,我似乎已经禁用GIT / msysgit要求输入密码。我现在有一个新的远程git仓库(在ubuntu上)没有设置密钥,它不会问我的密码。我试过了

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

它也不起作用。但我可以使用具有相同凭据的putty登录。

修改

这是我收到的消息

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 blah blah blah
Connection abandoned.
fatal: The remote end hung up unexpectedly

1 个答案:

答案 0 :(得分:0)

我认为您不会将ssh://user:password@host网址一起使用。

如果删除known_hosts文件不起作用(rm ~/.ssh/known_hosts),请尝试将ssh-rsa blah blah blah行添加到该文件中(如果您刚删除它,则创建它)。

这应该有所帮助。

应该有一个选项让git / ssh不中止与未知主机的连接,但我不知道。

相关问题