vibehowto

Home / Save your work (GitHub) / GitHub SSH key

GitHub SSH key

Updated Sep 18, 2026

One ed25519 key on this laptop. Public half on GitHub. Then git push over SSH, no PAT prompt.

Before you start:Create a GitHub repo

You will leave able to git push over SSH from this laptop. No personal access token prompt. If HTTPS + a PAT already works, you can skip this.

Step 1: Make a key if you do not have one

Terminal
ls ~/.ssh/id_ed25519.pub

If that file exists, skip to step 2. If not:

Terminal
ssh-keygen -t ed25519 -C "github-laptop" -f ~/.ssh/id_ed25519 -N ""

Empty passphrase is fine for a first laptop. A passphrase is better if the machine leaves the house.

Step 2: Public key on GitHub

Terminal
cat ~/.ssh/id_ed25519.pub

Copy the whole line. GitHub → Settings → SSH and GPG keys → New SSH key. Title: laptop. Key type: Authentication. Paste. Save.

Direct: github.com/settings/keys.

Step 3: Point the repo at SSH

Terminal
ssh -T git@github.com

First time it asks to trust GitHub’s host key. Type yes. You want a greeting with your username, not “permission denied.”

In the repo:

Terminal
git remote set-url origin git@github.com:YOUR-USERNAME/first-app.git
git remote -v
git push

HTTPS instead? GitHub personal access token.

Checklist

Saved in this browser. No account. Clearing site data wipes it.

Next: Ignore secrets before you write any · GitHub personal access token

Get new guides and videos by email

One email when something new is up. No spam. Unsubscribe anytime.