Thank you for being here! Working with multiple accounts and multiple ssh keys can be a tricky thing to set up.
Most of the time we recommend against having multiple accounts specifically for this reason, and usually just recommend that users use a single account for both work and personal projects. Still, we know this isn’t a good solution for everyone, so hopefully, we can point you in the right direction for setting this up!
To do this you’ll need to create an ssh config file in:
The contents should be similar to this, defining two different SSH hosts that point to GitHub but use different keys. You’ll need to modify the contents to point to your two separate SSH keys in the
This config sets it up so that every time you clone a repository using a standard SSH URL (
firstname.lastname@example.org:username/repo.git) it will use your personal account key, but if you modify the URL slightly you can tell it to use your work key instead (
I hope this helps!