【发布时间】:2015-01-22 21:42:24
【问题描述】:
我试图将项目从 github 拉到我的本地存储库。
我生成了所有必要的 ssh 密钥。我克隆了这个项目。但是当我试图提取更改时,我发现了:
$ git pull
The authenticity of host 'github.com (192.30.252.129)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.252.129' (RSA) to the list of know
n hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
这里是.ssh的内容:
C:\Users\nlel.ssh 目录
15.01.2014 13:35 <DIR> .
15.01.2014 13:35 <DIR> ..
09.01.2014 15:24 1 675 github_rsa
09.01.2014 15:24 391 github_rsa.pub
09.01.2014 13:08 1 751 id_rsa
09.01.2014 13:08 405 id_rsa.pub
15.01.2014 13:36 803 known_hosts
5 File(s) 5 025 bytes
2 Dir(s) 59 142 991 872 bytes free
它们出现在 github 帐户上。我克隆了项目ok。
解决方案:
我重新创建了我的密钥。并使用关键短语再次生成它们。
我从 pc 和 github 中删除了旧密钥并添加了新密钥。
现在一切正常。棘手的一点是这个 repo 是私有的。
- 为什么会这样?
- 如何解决这个问题?
【问题讨论】:
-
你用来克隆的命令是什么,克隆后你有没有对键进行任何更改?
-
好的,我已将您的结论包含在答案中以提高知名度。