Git 公钥访问被拒绝
我今天在我的 Windows 7 64 位机器上安装了 Git。我使用 git bash 来设置公钥等,并将信息也复制到我的帐户,如 Github 帮助。
现在我想在 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 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错误消息:权限被拒绝(公钥)。只是为了让你知道我已经将公钥复制到 github 了。 在 git bash 中它的工作原理。
奇怪的是我的笔记本电脑 Windows 7 但 32 位它可以工作。关于这个问题有什么线索吗?
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 [email protected]
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从 cmd 运行以下命令并再次尝试 ssh:
Run the following from cmd and try the ssh again: