Github Multi Account

  • Create ssh for github account:

  • Add account into ~/.ssh/config

  • Clone repo

    • git clone git@github-first:username/repository.git

  • Config github account:

  • Check git ssh configuration whether it matches to ssh key:

    • echo $GIT_SSH_COMMAND

  • If needed, change repo to SSH URL:

  • git remote set-url origin git@github.com:xxx/xxxx.git