Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
July 13, 2022 09:35 am GMT

Generate and Add a new SSH key to your GitHub account

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,

1. Generate the SSH key

The SSH key can be generated using ssh-keygen command using git bash as below,

ssh-keygen -t ed25519 -C "[email protected]"

replace [email protected] with your actual email address.

2. Add your SSH key to GitHub

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,

cat ~/.ssh/id_rsa.pub

Copy the public key from terminal. The final step is to add it to the GitHub.

SSH key add to github

To add it, go to your GitHub profile settings > SSH and GPG keys > new SSH key, add title for your key and paste the public key in Key box.

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


Original Link: https://dev.to/iamtekson/generate-and-add-a-new-ssh-key-to-your-github-account-39ob

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To