Skip to content

Instantly share code, notes, and snippets.

@webshru
Last active August 3, 2022 14:44
Show Gist options
  • Save webshru/9b4b0a87758020a8e7390a7de3b41d83 to your computer and use it in GitHub Desktop.
Save webshru/9b4b0a87758020a8e7390a7de3b41d83 to your computer and use it in GitHub Desktop.
Generate new SSH keys
ssh-keygen -t rsa -b 4096 -C "personal@mail.com" -f ~/.ssh/id_rsa_gitlab
ssh-keygen -t rsa -b 4096 -C "personal@mail.com" -f ~/.ssh/id_rsa_github
add config ~/.ssh/config
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_github
# Personal gitlab account
Host gitlab.com
HostName gitlab.com
User bgit
IdentityFile ~/.ssh/id_rsa_gitlab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment