can';无法从github中提取更改-权限被拒绝(公钥)。致命:无法从远程存储库读取
我试图将项目从github拉到本地存储库 我生成了所有必要的ssh密钥。我克隆了这个项目。但当我试图改变时,我发现:can';无法从github中提取更改-权限被拒绝(公钥)。致命:无法从远程存储库读取,git,github,ssh,pull,Git,Github,Ssh,Pull,我试图将项目从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 contin
$ 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
15.01.2014 13:35。
15.01.2014 13:35 ..
2014年1月9日15:24 1675 github_rsa
2014年1月9日15:24 391 github_rsa.pub
2014年1月9日13:08 1751 id_rsa
09.01.2014 13:08 405 id_rsa.pub
15.01.2014 13:36 803已知的_主机
5个文件5025字节
2个目录59 142 991 872字节可用
它们在github帐户中呈现。我克隆了这个项目
解决方案:
我重新创建了我的钥匙。并使用关键短语再次生成它们。我从pc和github中删除了旧密钥,并添加了新密钥 现在一切都好了。棘手的是,这次回购是私人的 -为什么会发生这种情况?
-如何解决此问题?ssh将只查找
%HOME%\.ssh\id\u rsa(.pub)
如果希望ssh选择一组不同的密钥,则需要在%HOME\.ssh\config
文件中声明这些密钥(我在目录中没有看到)
该config
文件将包括以下内容:
Host github
HostName github.com
User git
IdentityFile C:\path\to\.ssh\github_rsa
IdentitiesOnly yes
将您的“源站”
”遥控器的url重命名为:
cd /path/to/my/repo
git remote set-url origin github:yourName/YourRepo.git
这是推送(写入)您拥有的GitHub回购协议所必需的。从公共repo中提取(读取)数据时,根本不需要ssh密钥
在本例中,键可能不是正确的,重新创建这些键就足够了: 我重新创建了我的钥匙。并使用关键短语再次生成它们。
我从pc和github中删除了旧密钥,并添加了新密钥
它必须是
config.txt
文件吗?我猜用户一定是我吧?@nazar\u art no justconfig
。例如,请参阅。您用于克隆的命令是什么?克隆后您是否对密钥进行了任何更改?好的,我已将您的结论包含在答案中,以便于了解。