Reset github ssh auth
It’s a reminder for myself as I have several ssh key pairs.
-
Set ssh public key on github page. Mine is pub.bak.
-
Config private key in .ssh/config. Mine is id_rsa.bak.
Host github.com IdentityFile ~/.ssh/id_rsa.bak
-
Remove http origin if u have one, coz github doesn’t support http auth with username and password now. Execute
git remote remove origin
and add the new ssh origin.