文章

解决Agent admitted failure to sign using the key的方法

解决Agent admitted failure to sign using the key的方法

这两天没事瞎折腾rubyheroku,把~/.ssh/id_rsa搞乱了,结果直接导致我在github上的项目没法管理了!对于刚接触git不久的我来说算是遇到一个不大不小的麻烦了!

1
2
3
4
5
6
7
$git push origin master 
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.

解决方法

1
2
$ssh-add
Identity added: /home/user/.ssh/id_rsa (/home/user/.ssh/id_rsa)
本文由作者按照 CC BY 4.0 进行授权