Git Exercises

Git GitHub Add SSH

To add your SSH key to your GitHub account, follow these steps:


1. **Generate SSH Key Pair**: If you haven't already generated an SSH key pair, you can do so by using the `ssh-keygen` command in your terminal or command prompt. This will create a public key (`id_rsa.pub`) and a private key (`id_rsa`) on your local machine.


2. **Copy the Public Key**: Use the following command to display the contents of your public key:

cat ~/.ssh/id_rsa.pub
Copy the entire output starting from `ssh-rsa` and ending with your email address.


3. **Access GitHub Settings**: Open your web browser and go to GitHub (https://github.com). Sign in to your GitHub account.


4. **Go to SSH and GPG Keys Settings**: Click on your profile icon at the top-right corner of the page and select "Settings" from the dropdown menu. In the left sidebar, click on "SSH and GPG keys".


5. **Add New SSH Key**: Click on the "New SSH key" button.

6. **Provide a Title and Paste the Public Key**: In the "Title" field, give your SSH key a descriptive name. Then, paste the contents of your public key into the "Key" field.


7. **Add the SSH Key**: Click on the "Add SSH key" button to add your SSH key to your GitHub account.


8. **Verify the Key**: GitHub will ask you to enter your account password to confirm the action. Enter your password to proceed.


Once you've completed these steps, your SSH key will be added to your GitHub account. You can now use SSH to interact with your GitHub repositories, such as cloning, pushing, and pulling, without having to enter your username and password each time.

Remember to keep your private SSH key (`id_rsa`) secure and do not share it with others.



About the Author



Silan Software is one of the India's leading provider of offline & online training for Java, Python, AI (Machine Learning, Deep Learning), Data Science, Software Development & many more emerging Technologies.

We provide Academic Training || Industrial Training || Corporate Training || Internship || Java || Python || AI using Python || Data Science etc





 PreviousNext