DevOps/Cloud By GK
  • DevOps/Cloud Introduction
  • 🚩AWS
    • Create AWS Account
    • Launch EC2 Instance
  • 🚩Linux
    • User Managment
      • Adding the User to Sudo group
      • visudo
    • Directory / File Management
      • Vi
      • Changing Permissions (chmod)
      • Filtering IO/File
    • Memory Management
    • Process Management
    • Network Management
    • Service Management
    • Environmental Variables
      • $PATH
    • Utilities
    • SHELL PROGRAMMING
      • Hello World
      • Variables
      • Command Line arguments
      • Conditional Statements
      • Array
      • Loops
      • Functions
      • AWK
      • sed
      • Example Useful Scripts
      • Basic -> Advanced
  • 🚩git
    • Introduction
    • Creating GitHub Account
    • Installation
      • Git Bash In Windows
      • Git In VS Code
      • Git In Eclipse
      • Git CLI in Linux
  • Creating Git Remote Repository
  • Git Commands L -> R
  • Git Commands L <- R
  • Git Branch Commands
  • Using SSH (Password Less)
  • 🚩maven
    • Introduction
    • Installation
    • POM.xml
    • Goals
  • 🚩SonarQube
    • Introduction
    • Sonar Cloud
    • Creating Project In SonarCloud
    • Installing Sonar-Scanner
    • Triggering Scan
  • 🚩Nexus
    • Introduction
    • Installation of Nexus
    • Creating Repository
    • Uploading Artifacts to Repository
  • 🚩Jenkins
    • Introduction
    • Installation of Jenkins
    • First Job In Jenkins
    • Git + Jenkins
      • WebHook
    • Maven + Jenkins
    • Sonar-Scanner + Jenkins
    • Nexus + Jenkins
Powered by GitBook
On this page
  • ssh-keygen
  • Add your public key to your Git account
  • Configure the Git repository to use SSH

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.

ssh-keygen -t rsa

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.

  1. Open a web browser and navigate to GitHub.com.

  2. Sign in to your GitHub account.

  3. Click on your profile icon in the top right corner of the screen.

  4. Click on "Settings" in the dropdown menu.

  5. In the left-hand menu, click on "SSH and GPG keys".

  6. Click on the "New SSH key" button.

  7. Give your new key a title that will help you identify it later.

  8. Paste the contents of your public SSH key into the "Key" field on the GitHub website.

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

git remote set-url origin git@github.com:username/repo.git
PreviousGit Branch CommandsNextIntroduction

Last updated 2 years ago