Say you want to access GitLab.com for work (using your work email address), and you also want to access it for personal reasons (using your personal email address), and you want to do both on the same laptop.
Generate two SSH keys and save them in your ~/.ssh
directory.
I'll call them work_key
and personal_key
.
As always with SSH keys in GitHub or GitLab,
you'll want to generate a public key for each and add it to the corresponding GitLab account.
Then point to both private keys in your ~/.ssh/config
file: