0
点赞
收藏
分享

微信扫一扫

连接GIT报Permission denied (publickey).错误

火热如冰 2022-04-05 阅读 100
git

在使用ed25519代替rsa生成公钥并在github上配置后,git命令反复提示没权限

提示Permission denied (publickey).

ssh -vT git@github.com 看细节

最后参考官网。寻找蛛丝马迹:

错误:权限被拒绝(公钥) - GitHub Docs“权限被拒绝”错误表示服务器拒绝了您的连接。 可能有多个原因,最常见的如下所述。https://docs.github.com/cn/authentication/troubleshooting-ssh/error-permission-denied-publickey

Generating a new SSH key and adding it to the ssh-agent - GitHub DocsAfter you've checked for existing SSH keys, you can generate a new SSH key to use for authentication, then add it to the ssh-agent.https://docs.github.com/cn/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

配置config终于好了

config

host *
 # AddKeysToAgent yes
 # UseKeychain yes
  IdentityFile ~/.ssh/id_ed25519

ssh -T git@github.com

Hi Gao You've successfully authenticated, but GitHub does not provide shell access.

举报

相关推荐

0 条评论