我遇到类似于git - Server host key not cached中的问题,但有一个问题使最佳解决方案无法正常工作。git - 未缓存的服务器主机密钥 - Windows Twist
扭曲的是,我试图从Stash克隆一个存储库,一个来自Atlassian的应用程序,比如我们公司用来存储其git存储库的git-hub。在我将公钥输入到Stash之后,我使用Git Bash尝试使用系统为我提供的ssh地址克隆存储库。这会是什么结果:因为我没有使用腻子尝试连接
$ git clone ssh://[email protected]:7999/teamproject/gitrepo.git
Cloning into 'gitrepo'...
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 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:12
Connection abandoned.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
,我试图连接到服务器的SSH的解决方案:
$ ssh ssh://[email protected]:7999/teamproject/gitrepo.git
ssh: stash.mycompany.com:7999/teamproject/gitrepo.git: no address associated with name
,如果我试图缩短下来地址使用SSH可以识别,我得到一个不同的指纹比Git是拒绝:
$ ssh ssh://[email protected]
The authenticity of host 'stash.mycompany.com (10.XX.XXX.XX)' can't be established.
RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:34.
Are you sure you want to continue connecting (yes/no)? no
Host key verification failed.
我选择不继续连接,因为如果我不连接,它只是把不利于混帐做一个进入其工作到我的known_hosts文件中。
任何人都知道如何解决这个问题?
因此,从长远来看,没有“扭曲,使最好的解决方案没有工作”,它只是工作。 – 2015-04-03 10:14:28