Repository navigation
Description
Description
I've been using GitHub Desktop to push my changes to my repo on GitHub. Today when I went to push my latest commit, I got the following error:
Authentication failed. You may not have permission to access the repository or the repository may have been archived. Open options and verify that you're signed in with an account that has permission to access this repository.
Note that I CAN push to other private repos on my account via GitHub Desktop, just not this particular one. Also when I try to commit to another branch of this repo via command line on my server (a different machine than the one that I'm running GitHub Desktop from), the changes never show up on GitHub, but I don't get an error in the command line.
Version
- GitHub Desktop: 1.1.0
- Operating system: Windows 10 Home 64-bit (Version: 1709, Build: 16299.248)
Steps to Reproduce
Expected Behavior
I expected my commit to be pushed to GitHub.
Actual Behavior
I received the error shown above.
Additional Information
I tried following a bunch of issues already created in this repo in order to fix this, but kept hitting dead ends. Here are a couple things that I've done that I might have to undo for your solutions to work:
Ran the git config commands in #3661 to use openssh. I don't know how to undo this if I need to.
I also added a ssh key to my ~/.ssh/ folder since I didn't have one (I'm on windows running git bash). I created a key following GitHub's guide here: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
I added the key to my account properly (I'm familiar with using SSH with GitHub, so I don't think the key is the issue).
Activity
shiftkey commentedon Mar 5, 2018
@patrickdundas thanks for the feedback!
It looks like you're using an SSH remote - the changes in #3661 are only applied to HTTPS remotes, so this specific repository won't be affected.
There's one little part to this guide that might not be as clear as it should be, and I think it might be what's still causing you problems. When doing SSH authentication, Git expects to communicate with a running
ssh-agent.exeprocess to perform the authentication, so you need to ensure:ssh-agentis running (evalis used to execute the output and set environment variables, which is how Git knows which process to communicate with).These commands are tailored for Git Bash, if you're using a different shell these commands won't work as-is. Let me know if that's the case.
patrickdundas commentedon Mar 5, 2018
Thanks @shiftkey, but I have already used
ssh-add ~/.ssh/id_rsato add my key. I don't believe that's what causing the issue. I tried again to double check, but I am still getting the same error message.WaleedAshraf commentedon Mar 12, 2018
Facing the same issue. Changing to a https URL in the "Repository Settings" fixed the problem.
patrickdundas commentedon Mar 14, 2018
I ended up creating a new repo since my repo that was having issues was only a few days old. This definitely wasn't a solution, but I needed to keep going with my work since I rely on my repo being up-to-date for deployment. I'll be interested to hear if any solutions come out of this. Also, I'm pretty sure I was using a https url, although I'm not sure.
midium81 commentedon Jun 12, 2018
I'm facing exactly same issue both using SSH or HTTPS access. Funny is that trying to push/pull from git bash using cli commands on same repository with SSH works (requiring my SSH key passphrase at each command) but still not work if I try using the HTTPS communication (even providing proper credentials). Please note that my account is linked to a corporate one (which holds the repos) and we are using two-step authentication, not sure if this can change something. Ah, I'm on Windows 7 64 bit
mutablestudio commentedon Jul 11, 2018
I hit this issue today but only for ONE of the many repos I use. The other team and personal repos were working fine - when I switched to HTTPS for this specific repo I was able to push local commits without a problem. My github desktop (Mac OS 10.13.5) session was showing on the github site, so it seems like the auth was ok.
Here is the error log:
Is there some additional setup required in order to use SSH with desktop?? It seemed to work fine before latest desktop updates.
Simbiat commentedon Jul 18, 2018
Had the same issue today. I backed up my files on local, closed GHD, removed folder, opened GHD recloned the repository, replaced files with those from back ups... And successfully pushed to repository.
tdalon commentedon Sep 4, 2018
Facing this issue as well with Enterprise version. Not sure how connection is handled. It worked before out of the box.

(The error was parsed as 8: The repository does not seem to exist anymore. You may not have access, or it may have been deleted or renamed.)
2018-09-04T06:19:47.805Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: ahk - uid41890 (has token)
2018-09-04T06:19:47.963Z - error: [ui]
git -c credential.helper= fetch --progress --prune originexited with an unexpected code: 128.fatal: repository 'http://github.conti.de/ContiSource/ahk.git/' not found
Still the repo is accessible when I click on the link for example.
MulakaNaveen commentedon Sep 24, 2018
Authentication failed. You may not have permission to access the repository or the repository may have been archived. Open options and verify that you're signed in with an account that has permission to access this repository.
steveward commentedon Oct 4, 2018
@tdalon are you still having issues pushing to your GitHub Enterprise repository? Can you verify that you have the correct access permissions to push/pull from that repository still?
@MulakaNaveen if you are still encountering this error it would be helpful if you could upload a log file from a day where you experienced this issue. Here is where you can find the log files:
macOS logs location:
~/Library/Application Support/GitHub Desktop/logs/*.desktop.production.logWindows logs location:
%APPDATA%\GitHub Desktop\logs\*.desktop.production.logPlease upload a log file as an attachment and I can take a look.
billygriffin commentedon Dec 3, 2018
I'm going to close this issue since we haven't seen it in awhile and there's likely configuration-related things associated with it. If others are experiencing similar problems and see this issue, please reference this and fill out the template for bug report so we have a better understanding of your configuration and can hopefully better diagnose the underlying problem. Thanks!
santiagomj commentedon Jan 5, 2019
@WaleedAshraf Thanks a lot! it worked for me
Mauz013 commentedon Sep 6, 2020
Been getting issue any fix ?
steveward commentedon Sep 9, 2020
@Mauz013 if you are having issues with pushing using GitHub Desktop please open a new issue and fill out the template so that we can assist you further. Thanks!
adison-chire commentedon Feb 22, 2021
Despues de tanto y seguir todas las pautas esto fue lo unico que funciono. Muchas gracias