简体   繁体   English

Windows Server 2012上的Git SSH问题

[英]Git SSH Issue on Windows Server 2012

I have set up my ssh key in ~/.ssh and tested it on another PC (working) 我已经在~/.ssh设置了我的ssh密钥,并在另一台PC上对其进行了测试(正常工作)

ssh to git@bitbucket.org OK sshgit@bitbucket.org OK

ssh to bitbucket.org FAIL sshbitbucket.org 失败

git clone form git@bitbucket.org:account/gmc.git FAIL git clone形式git@bitbucket.org:account/gmc.git 失败

Any idea what is happening in this case and I am not able to git clone ? 任何想法在这种情况下发生什么,我无法git clone吗?

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 file know_hosts文件

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

Seems like the problem was conflict between Open SSH and PLINK.exe (used by putty) 似乎问题出在Open SSH和PLINK.exe(由腻子使用)之间发生冲突

Details here: Git server's host key not cached in registry - GitHub.com 这里的详细信息: Git服务器的主机密钥未缓存在注册表中-GitHub.com

Got it working by changing the GIT_SSH env var to /usr/bin/ssh.exe and now using openssh. 通过将GIT_SSH env var更改为/usr/bin/ssh.exe并现在使用openssh使其工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM