Add SSH Keys to Your GitHub/Gitlab Account and Clone a Repository

Step 1: Generate SSH Keys

Open your terminal and type the following command:

Press enter to accept the default file location and passphrase.

Step 2: Copy Public Key

Copy the generated public key to your clipboard using:

Step 3: Add SSH Key to GitHub

  • Go to your GitHub account settings and click on “SSH and GPG keys.”
  • Click on “New SSH key,” paste your public key, give it a title, and save.

Step 4: Clone the Repository

  • Visit the repository on GitHub and click on “Code.”
  • Choose SSH as the clone method and copy the SSH URL.

Step 5: Clone the Repository in Terminal

In your terminal, type:

Replace [SSH_URL] with the copied SSH URL. You should be able to clone the repository without entering your username and password.

By following these steps, you ensure a secure and efficient way to connect to your GitHub repositories using SSH keys.

Watch Full Video tutorial:


Discover more from TheFlipbit

Subscribe to get the latest posts to your email.

Leave a Reply

Discover more from TheFlipbit

Subscribe now to keep reading and get access to the full archive.

Continue reading