上传代码到github,出现 git@github.com: Permission denied (publickey) 错误

完整错误如下:

git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

报错原因:
本地公钥(public key)没有添加到GitHub的 SSH keys 列表

解决方案:
将本地产生的 id_rsa.pub 内的内容复现到 GitHub->Settings->SSH and GPG keys 中

posted @ 2020-12-13 21:47  bp9jISKIN  阅读(433)  评论(0编辑  收藏  举报