GitHub 'Permission Denied' or 403 When Pushing Over HTTPS

Share
Ongoing All platforms Updated November 13, 2026Based on 4 user reportsHow we research

Quick answer

A 403 or 'Repository not found' on push usually means Git is using the wrong account or a token without write access. Fix the cached identity, give the token write access to the repo, and authorize SSO if the org requires it.

Most likely fix: Check which account Git is using

How to fix it

Try these in order — the most common fix is first.

  1. 1. Check which account Git is using

    1. Run git remote -v to confirm the URL
    2. Remove the cached credential in Keychain Access (macOS) or Credential Manager (Windows)
    3. Push again and sign in with the right account
    Did this fix it?
  2. 2. Fix the token permissions

    1. Classic token: enable the repo scope
    2. Fine-grained token: select the repository and set Contents to Read and write
    3. Authorize the token for SSO under Configure SSO if the org uses it
    Did this fix it?
  3. 3. Confirm you have write access

    1. Open the repository > Settings > Collaborators, or ask an owner
    2. If you only have read access, fork the repo and open a pull request
    Did this fix it?
  4. 4. Use GitHub CLI to sign in cleanly

    1. Run gh auth login and gh auth status
    2. Run gh auth setup-git so Git uses its credentials
    Did this fix it?

Symptoms

git push shows 'remote: Permission to OWNER/REPO.git denied to USER', 'The requested URL returned error: 403', or 'remote: Repository not found' for a repo you can open in the browser.

Why it happens

  • Git is using a cached credential for a different GitHub account
  • The personal access token lacks the repo scope or Contents write permission, or is not granted that repository
  • The organization requires SAML SSO and the token is not authorized
  • You only have read access to the repository
  • The remote URL has a typo or the repository was renamed or moved (private repos return 'not found' instead of 403)

This guide also covers

  • remote permission denied to github 403
  • github repository not found but exists
  • the requested url returned error 403 github
  • fatal unable to access github 403

Still not working?

If GitHub keeps failing, you're not alone. See every GitHub problem users report or the alternatives people switch to.

Need a custom web app or internal tool? Our small team builds it, on your domain or hosted by us. Price agreed together.

Get a quote
Fixed it? Share this guide

Other GitHub errors

All 11 GitHub errors and fixes →