This content originally appeared on DEV Community and was authored by Mikołaj Buchwald
In order to use git over ssh, you need ssh keys. When you want to use multiple keys for different domains, you have to know where and how to configure it. I always forget where this configuration file is stored, so here I make a short note about it. Just edit ~/.ssh/config, e.g.:
vim ~/.ssh/config
Then put there something like:
Host github.com
HostName github.com
IdentityFile ~/.ssh/id_rsa_github
Host gitlab.com
HostName gitlab.com
IdentityFile ~/.ssh/id_rsa_gitlab
Et violà!
Source: https://superuser.com/a/232406/950943
This content originally appeared on DEV Community and was authored by Mikołaj Buchwald
Mikołaj Buchwald | Sciencx (2022-06-23T21:11:27+00:00) Git via SSH – multiple keys management. Retrieved from https://www.scien.cx/2022/06/23/git-via-ssh-multiple-keys-management/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.