往github上推代码虽然添加了ssh公钥,依然报权限不足

1.错误详情

注册了一个新的github账号,添加完ssh公钥之后,push的时候,依然报权限不足

具体信息:

Agent admitted failure to sign using the key.
Permission denied (publickey).
fatal: Could not read from remote repository.

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

2.解决办法

  • 打开终端
  • 输入下面的命令
ssh-add
  • 然后输入密码,回车之后重新推送代码。成功!!!
posted @ 2020-01-08 18:42  Runtimeing  阅读(803)  评论(0编辑  收藏  举报