GitHub: Using SSH

From wiki.jacobjohns.com
Revision as of 16:13, 27 July 2024 by Jjohns (talk | contribs) (Created page with "center|frameless <hr /><br /> # Ensure git is installed by running <code>git -v</code> # Using Powershell change the working directory to .ssh #* <code>cd C:\users\$env:USERNAME\.ssh\</code> # Launch Git Bash #* <code>bash</code> # Generate ssh key #* Ed25519 #** <code>ssh-keygen -t ed25519 -C "[email protected]"</code> #* RSA #** <code>ssh-keygen -t rsa -b 4096 -C "[email protected]"</code> # For GitHub, set a passphrase. From my tests i...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


  1. Ensure git is installed by running git -v
  2. Using Powershell change the working directory to .ssh
    • cd C:\users\$env:USERNAME\.ssh\
  3. Launch Git Bash
    • bash
  4. Generate ssh key
  5. For GitHub, set a passphrase. From my tests it doesn't appear to work without one.
  6. Verify file was created with ls.
  7. Initiate ssh-agent.
    • eval "$(ssh-agent -s)"
  8. Add ssh key to agent.
    • ssh-add ~/.ssh/id_rsa
  9. Copy the key to the clipboard.
    • clip < ~/.ssh/id_rsa.pub
  10. Sign into GitHub.
  11. Go to settings
  12. Select SSH and GPG keys
  13. New SSH key
  14. Give the key a title, paste the key in the Key field, and click Add SSH key.
  15. Back in bash test the connection
  16. Upon successful output we are finished.