2012-12-13 50 views
0

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

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

和它不工作的。但我可以用腻子用相同的凭据登录。

编辑

这是我得到

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 
+0

它是如何工作的?怎么了? – SLaks

回答

0

的消息,我不认为你会使用ssh://user:[email protected] URL。

如果删除您known_hosts文件不起作用(rm ~/.ssh/known_hosts),尝试添加ssh-rsa blah blah blah行到该文件(创建它,如果你只是删除了它,他)。

这应该有所帮助。

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

+0

是从Windows(客户端)或Ubuntu(服务器)删除主机?在过去,我成功地使用了语法 @但它通常要求输入密码 – neolaser

+0

@neolaser'ssh:// user @ host' is valid,'ssh:// user:password @ host'我认为不是。你必须从客户那里做东西。更具体地说,从Git Bash,所以它正确地解释'〜'。 – mgarciaisaia

相关问题