-
generate new identifity:
$ ssh-keygen -t rsa -C "[email protected]" #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 [email protected] IdentityFile ~/.ssh/id_rsa2 #repetitor Host gitlab.sakema.net HostName gitlab.sakema.net User [email protected] IdentityFile ~/.ssh/id_rsa
-
check:
$ ssh -T [email protected]
Hi 1um! You've successfully authenticated, but GitHub does not provide shell access.$ ssh -T [email protected] 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