VibeDict

🌿GitHub authentication failed

What you'll see
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

GitHub turned you away, saying, "I can't confirm you're allowed to upload to this repository."

🤔 Why does it happen?

  • GitHub no longer lets you upload with a password (you need a token or an SSH key)
  • An SSH key wasn't created, or wasn't added to GitHub
  • The repository address is wrong, or you don't have access (private repository)

🔧 Try this

  1. The easiest way is to use the GitHub login in GitHub Desktop or VS Code
  2. If you use the terminal, log in with gh auth login
  3. Check that the repository address is right with git remote -v

🤖 Ask your AI like this

I get the authentication error below when I git push. My computer is a [Mac/Windows]. Please walk me through the easiest way to set up GitHub login, step by step. [Paste the full error here]

Replace the [ ] parts with your own situation, and paste the error with a few extra lines before and after it.

Related terms

Other errors in this group