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
~/.sshfolder using the following command.ssh-keygen -t rsa -C "The access key for Github" -
Copy the
id_rsa.pubfile content. -
Open you Github
settings --> ssh and Gpgkeys --> New ssh keyand paste theid_rsa.pubcontents 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.
