SSH keys let Git authenticate without passwords. One-time setup:
ssh-keygen -t ed25519 -C "you@domain.com"
# Accept defaults; optionally set a passphrase
eval "$(ssh-agent -s)"
ssh-add --apple-use-keychain ~/.ssh/id_ed25519 # macOS
ssh-add ~/.ssh/id_ed25519 # Linux
Add the public key (cat ~/.ssh/id_ed25519.pub) to GitHub → Settings → SSH and GPG keys.
Use SSH-form remotes:
git remote set-url origin git@github.com:user/repo.git
Test the connection:
ssh -T git@github.com
ed25519 keys are smaller, faster, and at least as secure as RSA — prefer them.