-
generate new identifity:
$ ssh-keygen -t rsa -C "your_email@youremail.com" #save in ~/.ssh/id_rsa2 $ ssh-add ~/.ssh/id_rsa2
-
add id_rsa2.pub on github and id_rsa.pub(old one) to gitlub
-
create config for ssh
$ nano ~/.ssh/config
Host * ForwardAgent yes #another Host github.com HostName github.com User razum.reg@gmail.com IdentityFile ~/.ssh/id_rsa2 #repetitor Host gitlab.sakema.net HostName gitlab.sakema.net User onum.mail@gmail.com IdentityFile ~/.ssh/id_rsa
-
check:
$ ssh -T git@github.com
Hi 1um! You've successfully authenticated, but GitHub does not provide shell access.$ ssh -T git@gitlab.sakema.net Welcome to GitLab, Pavel Razumovskiy!
Last active
August 21, 2018 10:56
-
-
Save 1um/0b8c32a6c189527c10b5 to your computer and use it in GitHub Desktop.
Enable two keys for GitHub and GitLab
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment