How to have 2 Github SSH accesses?
The simple solution for me is to avoid ever switching my identity, so I don't have to automate the changing of the environment variables and files that provide the identity to the shell:
- Set up GitHub SSH for your work GitHub account e.g. ericcompanyabc.
- Next, on my personal GitHub repos, I simply add ericcompanyabc as a collaborator. Voila, I can now push to my personal projects (as ericcompanyabc on the company's computer) without having to switch GitHub account back and forth.
(granting ericpersonal access to work repos is impossible here of course)