标签:上传 很多 trying 显示 dsa ssh eth 本地 hub
$ ssh -T -v git@github.com报错:
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/eveline/.ssh/id_rsa
debug1: Trying private key: /Users/eveline/.ssh/id_dsa
debug1: Trying private key: /Users/eveline/.ssh/id_ecdsa
debug1: Trying private key: /Users/eveline/.ssh/id_ed25519
debug1: No more authentication methods to try.
git@github.com: Permission denied (publickey).
**看了很多博客和官方文档,我的解决方法如下
$ ssh-add -l
The agent has no identities.
如果是这样,就是没有添加成功私人密钥,虽然已经生成了并且上传到了GitHub的ssh
$ ssh-add ~/.ssh/id_rsa #这个id_rsa应是你命名的私人密钥默认名,这里显示为没有此文件。我在生成时命名为了Jack_key
/Users/eveline/.ssh/id_rsa: No such file or directory
$ ssh-add ~/.ssh/Jack_key
Identity added: /Users/eveline/.ssh/Jack_key (/Users/eveline/.ssh/Jack_key)
$ ssh-add -l
2048 SHA256:Dd02IHmxxxxx...xxxxxxxxxFPsHkGxiVh48m0qI /Users/eveline/.ssh/Jack_key (RSA)
$ ssh -T -v git@github.com即可
$ ssh -T -v git@github.com_在本地用ssh连接github出错_git@github.com: Permission denied (publickey).
标签:上传 很多 trying 显示 dsa ssh eth 本地 hub
原文地址:https://www.cnblogs.com/lyzz1314/p/12350098.html