- Set up SSH keys
1
ssh-keygen -t rsa -b 4096 -C "work.emailid"
1
Enter file in which to save the key (/Users/mark/.ssh/id_rsa): ./id_rsa_freecafe
Add the SSH (public) key to your Github account.
- Config SSH configuration file (~/.ssh/config) to manage the two separate keys.
1 2 3 4 5
# workid account Host workid-github.com HostName github.com User workid IdentityFile folder/id_rsa_workid
4.
1
git clone git@freecafe-github.com:free-cafe/free-cafe.github.io.git
Check the config
1
git config --list
How to manage multiple Github accounts from a single machine
Work With Multiple Github Accounts on a single Machine
8 Easy Steps to Set Up Multiple GitHub Accounts
Git: How to Handle Merge Conflicts