Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save reservedmuffin/7ff72b9973733d89b793160c55e03f34 to your computer and use it in GitHub Desktop.
Save reservedmuffin/7ff72b9973733d89b793160c55e03f34 to your computer and use it in GitHub Desktop.
Add multiple ssh keys (two or more different Github accounts)
In case you have for instance two separate Github accounts and two separate projects (project A and project B) you'd like to have two separate ssh-keys for:
Open an A project's .git/config file
Add
[core]
...
sshCommand = ssh -i ~/.ssh/id_first_key
Do the same for your project B with ~/.ssh/id_second_key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment