我有一个远程的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发布于 2012-12-13 01:41:15
我认为您不会在ssh:// URL中使用user:password@host。
如果删除known_hosts文件不起作用(rm ~/.ssh/known_hosts),尝试将ssh-rsa blah blah blah行添加到该文件(如果您刚刚删除了它,他)。
那会有帮助的。
应该有一个选项,使git/ssh不中止与未知主机的连接,但我不知道。
https://stackoverflow.com/questions/13851237
复制相似问题