-
-
Save root-11/66f1edbb04be88c9c0a33e3f5342a65f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If 2fa is enabled on github switch to ssh instead of https on linux | |
1. generate an ssh keypair on your linux box | |
ssh-keygen -t {rsa|dsa} | |
2. add the public key to github: profile - settings - ssh keys | |
3. switch from https to ssh | |
Check your repo remote: | |
git remote -v | |
should show: | |
origin https://github.com/USERNAME/REPOSITORY.git (fetch) | |
origin https://github.com/USERNAME/REPOSITORY.git (push) | |
Change the remote: | |
git remote set-url origin [email protected]:USERNAME/OTHERREPOSITORY.git | |
verify: | |
git remote -v | |
should show: | |
origin [email protected]:USERNAME/OTHERREPOSITORY.git (fetch) | |
origin [email protected]:USERNAME/OTHERREPOSITORY.git (push) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just what I was looking for.