@ZouChao

热爱PHP,RUBY,专注于web开发. 撸起袖子加油干!

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

$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. 

解决方法

$ssh-add
Identity added: /home/user/.ssh/id_rsa (/home/user/.ssh/id_rsa)