Git Public Key Access denied

核能气质少年 提交于 2019-12-06 13:47:20

问题


I setup today Git on my Windows 7 64bit Machine. I used the git bash for setting up the public key etc. and copied the information also to my account as proposed in Github help.

Now I want to use git within the cmd of my windows machine instead of the git bash. If I now type ssh -vT git@github.com I get the following results:

CMD:

OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: Connection established.
debug1: identity file /.ssh/identity type -1
debug1: identity file /.ssh/id_rsa type -1
debug1: identity file /.ssh/id_dsa type -1
...

GIT Bash:

OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: Connection established.
debug1: identity file /c/Users/Mark/.ssh/identity type -1
debug1: identity file /c/Users/Mark/.ssh/id_rsa type 1
debug1: identity file /c/Users/Mark/.ssh/id_dsa type -1

On the cmd git is aborting with the error message: Permission denied (publickey). Just to let you know I already copied the public key to github. In the git bash its working.

The strange thing is on my notebook Windows 7 but 32 bit its working. Any clue about this issue?


回答1:


Run the following from cmd and try the ssh again:

set HOME=c:\Users\Mark


来源:https://stackoverflow.com/questions/7378908/git-public-key-access-denied

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!