Github SSH Setup
Quick write-up on setting up github ssh
Thanks to @ksridhar02 for helping us write this!
AI-powered write-up, verify yourself!
This is one of those things, most developers (including me) just install and use without thinking about it. So, just doing quick-AI write-up to learn it.
The developer's most used tool was Github, so every time you push your changes you will be asked to enter your Github details which is a tiresome work so setting an ssh key
to your Github will make your life a lot easier.
Official Instructions
You should ideally follow the official instructions provided by GitHub here.
Setup SSH
- Open Your terminal and set the following
- After this step check if you have any SSH keys present locally by this command.
- Now you have to generate ssh key in your terminal with the following command and click as enter for all the options as default values will be enough for creating a ssh key
- Now you need to copy your SSH public key and add it to GitHub.
Copying the SSH key
Depending on your operating system, use one of the following methods:
On Linux (with xclip
):
On macOS:
This copies the key to your clipboard directly.
On Windows (using Git Bash or PowerShell):
This will copy the SSH key to your clipboard.
- Now open your GitHub account in the browser → Settings → SSH and GPG Keys.
- Click New SSH Key, give it a descriptive title (e.g., My Laptop SSH), and paste the copied key into the Key field.
- Save it.
- Now open your terminal and Check the ssh key using this command.
- After this, you will be prompted with this text
Though little cryptic but this message means you have successfully setup Github SSH setup.
Last updated on