Stage 6 · Lesson 2 of 8
SSH keys for GitHub
does not accept your account password for Git over . You use or a token instead. An SSH key comes as a pair of files: a private key you keep secret, and a public key you can share.
Generate a pair with ssh-keygen -t ed25519 -C "you@example.com" and protect it with a . Add the private key to your , a helper that remembers it for you. Paste the public key, the file ending in .pub, into GitHub's settings.
Then ssh -T git@github.com checks that it works. The private key never leaves your machine, and one key per machine is normal. On Windows, create the key inside WSL if you use Git in WSL.
Common trapsharing or uploading the private key, or copying it between machines instead of generating a new one.
A question to check yourself, an AI practice session and 1 cheat sheet entry come when you add the roadmap to your account. Add it
Resources for this stage
Start with· follow one of these
- BookFreePro Git
Scott Chacon and Ben Straub
Chapter 6 covers GitHub itself: forks, pull requests and maintaining a project
- GuideFreeContributing to a Project (GitHub Docs)
GitHub · Beginner
GitHub's own walkthrough of the fork, branch and pull request workflow
Practise
Keep handy
Also worth your time
A widely used commit message convention you will meet in many repositories
- roadmap.sh: Git and GitHubGo deeper
The GitHub half of the map: Actions, projects, security features and more