Skip to content

Instantly share code, notes, and snippets.

@knockshore
Last active October 24, 2023 15:51
Show Gist options
  • Save knockshore/366a3967aa221a33a51cc4e5e5b66369 to your computer and use it in GitHub Desktop.
Save knockshore/366a3967aa221a33a51cc4e5e5b66369 to your computer and use it in GitHub Desktop.
Add SSH key of your PC to your Github account

Check if you have id_rsa.pub file

  • Check contents of id_rsa.pub cat ~/.ssh/id_rsa.pub You should get something like this: sshrsapic

Create a new SSH key (Linux)

  • Open shell (bash)
  • Create new SSH key, ssh-keygen
  • keep pressing enter key until you get the fingerprint ASCII image
  • After this is complete. You can now check if id_rsa.pub file is present

Create a new SSH key (Windows)

  • Open CMD (cmd)
  • Create new SSH key, ssh-keygen
  • keep pressing enter key until you get the fingerprint ASCII image
  • After this is complete. You can now check if id_rsa.pub file is present

If you don't have Git for Windows

Add your SSH key (id_rsa.pub) in Github SSH Keys

  • Click on your profile picture
  • Go to Settings
    image
  • In the Access section, click on SSH and GPG Keys
    image
  • In the SSH Keys section, click on New SSH Key
    image
  • In the Add SSH key form, give a title
  • Paste the SSH public key in the Key field
    image
  • Click on **Add SSH Key
  • Proceed with Git clone, fetch, push, pull actions on your PC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment