New
Use a Different Key per Account or Host
Two config blocks for the same host with different keys, so a work account and a personal account never collide.
IdentitiesOnly yes is the part that matters: without it the agent offers every key it holds and the server accepts whichever matches first, which is rarely the one you meant. Clone with the alias, for example git@github-work:org/repo.git.
When you need this: Two GitHub accounts on one machine, or a client server that must not be reachable with your default key.
Variables
Command
2 views
0 copies
Related in this category
Log in to save
Free account. Save snippets into your own collections.