GitHub: Using SSH: Difference between revisions
From wiki.jacobjohns.com
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..." |
m Jjohns moved page GibHub: Using SSH to GitHub: Using SSH without leaving a redirect: Misspelled title |
||
(No difference)
| |||
Latest revision as of 16:26, 27 July 2024

- Ensure git is installed by running
git -v - Using Powershell change the working directory to .ssh
cd C:\users\$env:USERNAME\.ssh\
- Launch Git Bash
bash
- Generate ssh key
- Ed25519
ssh-keygen -t ed25519 -C "[email protected]"
- RSA
ssh-keygen -t rsa -b 4096 -C "[email protected]"
- Ed25519
- For GitHub, set a passphrase. From my tests it doesn't appear to work without one.

- Verify file was created with
ls. - Initiate ssh-agent.
eval "$(ssh-agent -s)"
- Add ssh key to agent.
ssh-add ~/.ssh/id_rsa
- Copy the key to the clipboard.
clip < ~/.ssh/id_rsa.pub
- Sign into GitHub.
- Go to settings

- Select SSH and GPG keys

- New SSH key

- Give the key a title, paste the key in the Key field, and click Add SSH key.

- Back in bash test the connection
ssh -T [email protected]
- Upon successful output we are finished.

