Skip to content

Instantly share code, notes, and snippets.

@dozyc
Created October 1, 2018 21:41
Show Gist options
  • Save dozyc/0262e9251b13e477f38e0863afd5f74b to your computer and use it in GitHub Desktop.
Save dozyc/0262e9251b13e477f38e0863afd5f74b to your computer and use it in GitHub Desktop.
How to use different id_rsa for same github repo
# for ~/.ssh/config
# each of these can be set up as different remotes for a git repo:
# set up the git remote as git@github-as-idx:<repo>
host github-as-id1
HostName github.com
IdentityFile ~/.ssh/id_rsa_1
User git
host github-as-id2
HostName github.com
IdentityFile ~/.ssh/id_rsa_2
User git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment