Today’s tutorial demonstrates how to configure GitHub ssh in your Ubuntu 22.04 operating system. We often use git and GitHub for development purposes, so connecting to remote Github is an important step in our development journey.
Follow the below steps to connect your local machine to GitHub remote by configuring the GitHub ssh key.
Create a GitHub SSH key pair with the ssh-keygen commandAdding a password to your private key is completely optional. By default id_rsa file is the private key file, the computer will automatically figure out which one is the default file.
You can run the below command to see the public key.
cat /home/$USER/.ssh/id_rsa.pubLogin to GitHub and navigate to your account settings
You can see the menu when you hover the avatar at the top right position.
Click on the SSH and GPG keys link on the left-hand side menu and add your new public there by clicking the New SSH Key button
Save your changes and that’s it.
lenovo@ubuntu:~$ git clone [email protected]:testrepo/repo-imporatn.git
This will pull the files from your private repo to your computer.
- Just want to thank us? Buy us a Coffee
- May be another day? Shop on Amazon using our links.
Your prices won't change but we get a small commission.
Leave a Reply