When working with a GitHub repository, you'll often need to identify yourself to GitHub using your username and password. An
SSH key is an alternate way to identify yourself that doesn't require you to enter you username and password every time. To add such key, you need to generate it on your PC. To generate and add it to GitHub, you need to follow following steps,
SSH key can be generated using
ssh-keygen command using git bash as below,
ssh-keygen -t ed25519 -C "firstname.lastname@example.org"
replace email@example.com with your actual email address.
By default, the
SSH key will be stored in the home directory. Now, you need to copy the public key. The public key can be seen using
cat command as below,
Copy the public key from terminal. The final step is to add it to the GitHub.
To add it, go to your GitHub profile
SSH and GPG keys >
new SSH key, add title for your key and paste the public key in
I hope this post is informative for you. If you like this blog, please support me by subscribing to my YouTube channel: https://www.youtube.com/c/iamtekson