When I do git pull
via the command line, it always asks for my github username and password. I'd like to tell it to use the ssh key in github, and never have to worry about it again. How do you do this?
Assuming that you have used ssh-keygen
to generate a key pair and uploaded the public key in the appropriate place in your github account, you should be able to set remote to use the url [email protected]:username/repo.git
.
git remote set-url origin [email protected]:username/repo.git
If you do not have local changes that you care about, you can just delete your local repository and clone again:
git clone [email protected]:username/repo.git
Here are github's instructions on this setup, which you can use as a reference as needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With