2011-09-11 73 views
1

我今天在Windows 7 64位机器上安装了Git。我使用git bash来设置公钥等,并按照Github help中的建议将这些信息复制到我的帐户中。Git公钥访问被拒绝

现在我想在我的Windows机器的cmd内使用git而不是git bash。如果我现在键入ssh -vT [email protected]我得到如下结果:

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击:

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 

在CMD Git是与错误信息中止:权限被拒绝(公钥) 。只是为了让你知道我已经将公钥复制到github。 在git bash中工作。

奇怪的是我的笔记本电脑上的Windows 7,但32位的工作。有关这个问题的任何线索?

+0

什么是笔记本上的输出? – svick

+0

不,它是在我的电脑上 – Gambo

回答

3

运行CMD从以下并再次尝试SSH:

set HOME=c:\Users\Mark 
+0

这样做的伎俩,我错过了配置的东西?或者它与我的Windows版本有关? – Gambo