Skip to content

Instantly share code, notes, and snippets.

@reservedmuffin
reservedmuffin / multiple_ssh_keys_for_several_github_accounts
Created October 28, 2022 20:28
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