Skip to content

Unable to push in GitHub desktop #4181

Closed

Description

@patrickdundas

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).

Logs

2018-03-05.desktop.production.log

Activity

  1. shiftkey commented on Mar 5, 2018

    @shiftkey
    Member

    @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.exe process to perform the authentication, so you need to ensure:

    • ssh-agent is running (eval is used to execute the output and set environment variables, which is how Git knows which process to communicate with).
    $ eval "$(ssh-agent -s)"
    Agent pid 59566
    
    • your new key is added to the ssh-agent process, so it knows about it:
    ssh-add ~/.ssh/id_rsa
    

    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.

  2. patrickdundas commented on Mar 5, 2018

    @patrickdundas
    Author

    Thanks @shiftkey, but I have already used ssh-add ~/.ssh/id_rsa to 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.

  3. added
    investigation-needed
    on Mar 5, 2018
  4. WaleedAshraf commented on Mar 12, 2018

    @WaleedAshraf
    Contributor

    Facing the same issue. Changing to a https URL in the "Repository Settings" fixed the problem.

  5. patrickdundas commented on Mar 14, 2018

    @patrickdundas
    Author

    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.

  6. midium81 commented on Jun 12, 2018

    @midium81

    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

  7. mutablestudio commented on Jul 11, 2018

    @mutablestudio

    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:

    Failed to load resource: the server responded with a status of 422 (Unprocessable Entity)
    http.ts:161 Uncaught (in promise) s: No commit found for SHA: dd0bba0ddb3a274a0fca4cf008656b23337bee09
        at Object.t.parsedResponse (file:///Applications/GitHub%20Desktop.app/Contents/Resources/app/renderer.js:27:38143)
        at <anonymous>
    install.ts:31 [AppStore.withAuthenticatingUser] account found for repository: defqt - mutablestudio (has token)
    install.ts:31 Executing push: git -c credential.helper= push origin dev:dev --progress (took 1.958s)
    install.ts:23 `git -c credential.helper= push origin dev:dev --progress` exited with an unexpected code: 128.
    [email protected]: Permission denied (publickey).
    fatal: Could not read from remote repository.
    

    Is there some additional setup required in order to use SSH with desktop?? It seemed to work fine before latest desktop updates.

  8. Simbiat commented on Jul 18, 2018

    @Simbiat

    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.

  9. tdalon commented on Sep 4, 2018

    @tdalon

    Facing this issue as well with Enterprise version. Not sure how connection is handled. It worked before out of the box.
    image

    (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 origin exited 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.

  10. MulakaNaveen commented on Sep 24, 2018

    @MulakaNaveen

    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.

  11. steveward commented on Oct 4, 2018

    @steveward
    Contributor

    @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.log
    Windows logs location: %APPDATA%\GitHub Desktop\logs\*.desktop.production.log

    Please upload a log file as an attachment and I can take a look.

  12. billygriffin commented on Dec 3, 2018

    @billygriffin
    Contributor

    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!

  13. santiagomj commented on Jan 5, 2019

    @santiagomj

    @WaleedAshraf Thanks a lot! it worked for me

  14. Mauz013 commented on Sep 6, 2020

    @Mauz013

    Been getting issue any fix ?

  15. steveward commented on Sep 9, 2020

    @steveward
    Contributor

    @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!

  16. adison-chire commented on Feb 22, 2021

    @adison-chire

    Frente al mismo problema. Cambiar a una URL https en la "Configuración del repositorio" solucionó el problema.

    Despues de tanto y seguir todas las pautas esto fue lo unico que funciono. Muchas gracias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    investigation-needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions