【问题标题】:Git Public Key Access deniedGit 公钥访问被拒绝
【发布时间】:2011-09-11 14:36:00
【问题描述】:

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

现在我想在我的 Windows 机器的 cmd 中使用 git 而不是 git bash。如果我现在输入ssh -vT git@github.com,我会得到以下结果:

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 正在中止并显示错误消息:Permission denied (publickey)。只是为了让你知道我已经将公钥复制到了 github。 在 git bash 它的工作。

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

【问题讨论】:

  • 你笔记本上的输出是什么?

标签: git windows-7-x64


【解决方案1】:

从 cmd 运行以下命令并再次尝试 ssh:

set HOME=c:\Users\Mark

【讨论】:

  • 成功了,我是否遗漏了一些配置?还是跟我的windows版本有关?
猜你喜欢
  • 1970-01-01
  • 2014-03-18
  • 1970-01-01
  • 2020-01-04
  • 2013-11-08
  • 2018-11-06
  • 2016-11-01
  • 2014-02-01
相关资源
最近更新 更多