Skip to main content
Version: 0.9.1

SSH key

If you clone over SSH (git@github.com:<OWNER>/<REPO>.git) instead of HTTPS, git authenticates with a key pair rather than a credentials manager:

ssh-keygen -t ed25519 -C "you@example.com" # accept the default path
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub # paste this into GitHub

Add the printed public key at GitHub → Settings → SSH and GPG keys → New SSH key, then confirm with:

ssh -T git@github.com

Pick one of credentials-manager or SSH key, not both — whichever matches the clone URL you use.