How to set up SSH with GitHub in 60 seconds
Jan 1, 2023
·
- [
- tools ]
When I started programming, SSH keys scared me. Everyone seemed to know how they worked except me, and I was too embarrassed to ask.
It turns out there’s not much to it. You make a key, you give the public half to GitHub, and you’re done.
Make the key:
ssh-keygen -t ed25519 -C "you@example.com"Load it:
eval "$(ssh-agent -s)"ssh-add ~/.ssh/id_ed25519Print the public half and paste it into GitHub under Settings → SSH keys:
cat ~/.ssh/id_ed25519.pubCheck that it worked:
ssh -T git@github.comIf GitHub says hi, you’re in.
That’s it.