简体   繁体   English

权限被拒绝(公钥)。 在 GitHub 上

[英]Permission denied (publickey). IN GITHUB

I followed the ways given by GitHub help website.我遵循了 GitHub 帮助网站给出的方法。 And already added my pub key to GitHub settings.并且已经将我的公钥添加到 GitHub 设置中。 I'm sure that I copy the pub key correct.我确定我复制的公钥是正确的。 But I got the response that the permission denied.但我得到了许可被拒绝的回应。 Moreover, I can join my friend's Repositories.此外,我可以加入我朋友的存储库。

There could be multiple reasons for this, I would probably just check for this first这可能有多种原因,我可能会先检查一下

ssh -vT git@github.com

Analyze the output to see what comes up分析输出以查看结果

Source: http://help.github.com/ssh-issues/来源: http : //help.github.com/ssh-issues/

May be this problem occurred when you tried accessing your github account using a new system mostly MacOS.当您尝试使用主要是 MacOS 的新系统访问您的 github 帐户时,可能会出现此问题。 To do the authentication that you are accessing the correct server the your OS uses ssh protocol to communicate to the github server.为了验证您正在访问正确的服务器,您的操作系统使用 ssh 协议与 github 服务器通信。 For that the ssh key generated by your OS should be saved in the guthub.为此,您的操作系统生成的 ssh 密钥应保存在 Guthub 中。

Follow the steps given in official docs of github.按照 github 官方文档中给出的步骤进行操作。 The error occur mainly due to the absence of ssh agent key in your github.发生该错误的主要原因是您的 github 中缺少 ssh 代理密钥。 You need to generate one in your OS and then paste it in the ssh key setting option of github.您需要在您的操作系统中生成一个,然后将其粘贴到 github 的 ssh 密钥设置选项中。

https://docs.github.com/en/github/authenticating-to-github/error-permission-denied-publickey https://docs.github.com/en/github/authenticating-to-github/error-permission-denied-publickey

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM