Using SSH (Password Less)
To use SSH to push to a Git repository without entering a password every time, you can set up SSH keys between your local machine and the remote repository
ssh-keygen
Generate an SSH key pair on your local machine using the ssh-keygen
command. This command will create a public and private key pair.
This will create a new SSH key pair
Add your public key to your Git account
This involves copying the contents of the public key file (~/.ssh/id_rsa.pub
) and pasting it into the SSH keys section of your Git account settings.
Open a web browser and navigate to GitHub.com.
Sign in to your GitHub account.
Click on your profile icon in the top right corner of the screen.
Click on "Settings" in the dropdown menu.
In the left-hand menu, click on "SSH and GPG keys".
Click on the "New SSH key" button.
Give your new key a title that will help you identify it later.
Paste the contents of your public SSH key into the "Key" field on the GitHub website.
Click the "Add SSH key" button.
Configure the Git repository to use SSH
Change the remote URL for your Git repository to use the SSH URL instead of the HTTPS URL.
Last updated