Windows Server 2012上的Git SSH问题

时间:2014-09-25 12:24:56

标签: windows git ssh bitbucket

我在~/.ssh设置了我的ssh密钥,并在另一台PC(工作)上进行了测试

sshgit@bitbucket.org 确定

sshbitbucket.org 失败

git clone表单git@bitbucket.org:account/gmc.git 失败

知道在这种情况下发生了什么,我无法克隆克隆?

user@pc //server/users$/user
$ ssh git@bitbucket.org
Enter passphrase for key '/c/Users/user/.ssh/id_rsa':
logged in as thedev.

You can use git or hg to connect to Bitbucket. Shell access is disabled.
Connection to bitbucket.org closed.

user@pc //server/users$/user
$ ssh bitbucket.org
Permission denied (publickey).

user@pc //server/users$/user
$ git clone git@bitbucket.org:account/gmc.git
Cloning into 'gmc'...
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 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40
Connection abandoned.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

know_hosts文件

bitbucket.org,131.103.20.167 ssh-rsa abc...==

1 个答案:

答案 0 :(得分:0)

似乎问题是Open SSH和PLINK.exe(由putty使用)之间的冲突

详细信息: Git server's host key not cached in registry - GitHub.com

通过将GIT_SSH env var更改为/usr/bin/ssh.exe并使用openssh来实现它。