Last Updated: February 25, 2016
·
2.782K
· novalagung

Git - fatal error : Agent admitted failure to sign using the key

git push -u origin master

Agent admitted failure to sign using the key.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

If you got error like that, you can use command ssh-add ~/.ssh/id_rsa to solve.

If you just generated a key, ssh-agent does not know about it so it can't sign using the key - exactly what the error message says.

To add the key, you either need to restart ssh-agent (i.e. log out and log back in) or to use ssh-add to re-scan the keys.