最近,我在 Github.com 上注册了一个免费计划。
我按照他们的说明生成一个 ssh key 以添加到我的帐户。
但是,当我尝试 ssh -v git@github.com
时,出现了这个错误:
debug1: Server accepts key: pkalg ssh-rsa blen 277
Agent admitted failure to sign using the key.
debug1: Trying private key: /home/phuongnd08/.ssh/identity
debug1: Trying private key: /home/phuongnd08/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey).
当我查看错误时,我发现这里有一件有趣的事情,那就是没有尝试 .ssh/id_rsa,只尝试了 .ssh/identity 和 .ssh/id_dsa。
如何解决这个错误? 谢谢
最佳答案
您可以使用 ssh-add ~/.ssh/id_rsa
来解决这个问题。
关于ubuntu - SSH 无法向 git@github.com 进行身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2122465/