Authentication failed on github push to origin from desktop. what to do?

I’m starting from a clean install. After having restored my backup to my desktop, I downloaded github desktop, logged in and started rebuilding by “Add existing repository” from my restored folders. All repositories can fetch and push to origin without problems except one. I am getting this error:

Authentication failed. Some common reasons include:

  • You are not logged in to your account: see GitHub Desktop > Preferences.
  • You may need to log out and log back in to refresh your token.
  • You do not have permission to access this repository.
  • The repository is archived on GitHub. Check the repository settings to confirm you are still permitted to push commits.
  • If you use SSH authentication, check that your key is added to the ssh-agent and associated with your account.

I have tried troubleshooting following common reasons above and more:

  1. I am logged in. All repos belong to 1 user and I have successfully logged in. And it’s working in all repos.
  2. I have logged out and logged back in. Same error.
  3. I have permission to access repo. I use same login in desktop and in web.
  4. The repo is not archived AFAIK.
  5. I am not using SSH authentication.

In addition to these, I also compared settings with a repo that can successfully do push to origin without authentication failures. All settings (Options, Manage access, Security & analysis, Branches, Webhooks, Notifications, Integrations, Deploy keys, Actions, Secrets, Moderation settings) are identical:

What am I missing? Thanks.


  • MacBook Air (13-inch, 2017)
  • MacOS Big Sur 11.0.1 (20B50)
  • Github Desktop Version 2.6.0

I was able to solve it. Here’s what I did for the solution.

I hope it helps others.

I’m glad to hear you were able to get things working @gio888. GitHub Desktop defaults to HTTPS authentication, but SSH will work after configuration. We’re tracking some known issues with using SSH in this issue.

If you run into any issues using HTTPS auth in the future I’d be happy to look into it with you.

1 Like