Problem: I want to clone, push and do other git activities on my GitHub repo without using username and password all the time.
Solution To achieve this, you need to add ssh keys to GitHub server. Follow the steps given below for the setup.
-
Create an ssh key pair in your
~/.ssh
folder using the following command.ssh-keygen -t rsa -C "The access key for Github"
-
Copy the
id_rsa.pub
file content. -
Open you Github
settings --> ssh and Gpgkeys --> New ssh key
and paste theid_rsa.pub
contents and save it. -
Now you can use clone commands without username and password. Also, make sure you use the ssh repo link that you will get with the toggle in the clone settings.