Reset github ssh auth

tips

It’s a reminder for myself as I have several ssh key pairs.

  1. Set ssh public key on github page. Mine is pub.bak.

  2. Config private key in .ssh/config. Mine is id_rsa.bak.

    Host github.com
      IdentityFile ~/.ssh/id_rsa.bak
    
  3. 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.