The Prompt BakeryTemplates and prompts

Fix · GitHub and Git

Permission denied (publickey) when pushing over SSH

Blocks your workNot checked against the vendor's current screens

What you may see

  • The push says permission denied (publickey)
  • It says could not read from the remote repository
  • I just got a new computer or changed my key

Most likely cause

GitHub does not know the SSH key of this computer, or the key is not loaded.

Check first (about two minutes)

  1. Run ssh -T git@github.com and read the answer; a greeting with your user name means the key works.
  2. Run ssh-add -l to see if a key is loaded.

The fix prompt

What you type here never leaves your browser. The search runs on this page, and nothing is sent to a server or to an AI.

Kept only in this browser, on this device. Keys and passwords are removed before anything is saved.

Prompt language

Paste it into Claude, ChatGPT, Gemini or Cursor, then follow what it says.

After you tried it, did it work?

Steps

  1. Run ssh -T git@github.com and ssh-add -l and show me the output.
  2. If no key exists, create one with ssh-keygen -t ed25519 -C "my label" and a passphrase, and load it with ssh-add.
  3. Show me ONLY the public key (the file ending in .pub) so I can add it in my GitHub account under the settings page for SSH keys (the page may be labelled differently).
  4. Test again with ssh -T git@github.com, then retry the push.

Do not do this

  • Never send the private key to anyone or paste it anywhere.
  • Do not switch off host key checks to "get past" the error.
  • Do not open, print or copy the private key file (the one without .pub).

Related

Try another entry

How can we help?

What do you need?
Your email, so we can reply (optional)Only enter your own email. We reply there.