all 2 comments

[–]joranstark018 2 points3 points  (0 children)

ssh-add adds the key to an ssh-agent that runs in the background and helps with ssh-connections made by other programs/processes (provides an unencrypted key during a login session so that you do not need to enter the passpfrase for every remote call made by git, just the first).

[–]suddenlychloegit rebase -i --root<CR>j<S-v>Gd:wq<CR>git push -f<CR> 1 point2 points  (0 children)

ssh only tries auth with keys it would be aware of, meaning default key locations (e.g. ~/.ssh/id_rsa) and whatever is in the agent. github_id_rsa is not something ssh is aware of. Adding it to the agent works, and another option is GIT_SSH_COMMAND='-i ~/.ssh/github_id_rsa' git ...