I have always stumbled on this problem of managing SSH keys for multiple Git based SCM (Gitlab, GitHub) including multiple GitHub accounts.
If you’ve single account - adding the SSH keys on your github or gitlab is simple.
I currently have the following accounts:
Github
- 1 personal account
- 2 behind the firewall (corporate accounts)
Gitlab
- 1 personal account
- 1 corporate account
If ever face a problem like this, it is best to create a ssh-config file which aggregates all your SSH keys. You must follow the steps below:
