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?
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