GitHub: Using SSH

From wiki.jacobjohns.com


  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.