</>CodexBash
All articles
Setup guides

Add an SSH key to GitHub

Step-by-step: check for an existing key, generate an Ed25519 key on Windows, macOS or Linux, add it to ssh-agent, paste the public key into GitHub, test the connection, switch a repository from HTTPS to SSH, use separate keys for work and personal accounts, sign commits with SSH, and fix permission denied errors.

CodexBash, , 5 min read

Pushing to GitHub over HTTPS asks you to sign in through a browser or a personal access token. SSH is the alternative many developers prefer: set up a key once, and git push just works, securely, without tokens to copy around. Our SSH keys article explained how key authentication works; this guide is the practical, step-by-step version for GitHub on any operating system, plus multiple accounts and commit signing.

Sign in to read the rest

The whole 5 minute article is free with an account, along with every problem, lesson and tutorial. No card.