Clone and Push to Guthub Repo Without username and password

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.

  1. Create an ssh key pair in your ~/.ssh folder using the following command.

     ssh-keygen -t rsa -C "The access key for Github"
  2. Copy the file content.

  3. Open you Github settings --> ssh and Gpgkeys --> New ssh key and paste the contents and save it.

  4. 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.