Able to fetch/pull but not push.
See original GitHub issueDescribe the bug
If something changes in the repo on GH, it is present in GH Desktop (suggesting that the app can fetch and pull). However, the app insists that the branch has not been published, and when I attempt to publish it, I get the following error:
Authentication failed. Some common reasons include:
- You are not logged in to your account: see File > Options.
- 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 attempted logging out and in and confirmed that my key is added to ssh-agent and associated with my account - I am able to push from Git Bash, which was installed with the app.
I have also checked the registry values mentioned in Known Issues, and they are not present.
Version & OS
Version 2.5.0 on Windows 10.
Steps to reproduce the behavior
- Click on “Publish branch”
- Receive error message described above.
Expected behavior
The branch to be pushed to GitHub.
Actual behavior
The error message described above.
Logs
2020-05-21T01:26:14.635Z - error: [ui] `git -c credential.helper= -c protocol.version=2 push origin test-gh-desktop --set-upstream --follow-tags --progress` exited with an unexpected code: 128.
stderr:
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
(The error was parsed as 2: Authentication failed. Some common reasons include:
- You are not logged in to your account: see File > Options.
- 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.)
Additional context
The repository is private, but that shouldn’t matter, as I have access to it and can, as I said, push from Git Bash with no issue. Thank you for your time and effort.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Woohoo, glad to hear and thanks for the feedback!! 🥳
The place was called Benu, which was named one of the best restaurants in the world. I take it there is lots of room to dine now, haha. Happy to join you and Samer anytime. Good to hear from you and stay in touch!
@tierninho Whoa!!! Long time no see man! Hope all is well in these crazy times. As an aside - do you remember which restaurant we went to with Samer et al after our hackathon? I’ve been wanting to go there again one of these days (though obviously not one of these days, haha).
I just always use SSH remotes because once upon a time someone told me that’s more secure and I never questioned it further (one answer to this question suggests that the recommendation has changed over time, not sure if that’s true).
In any case, your recommendation worked! Seems like HTTPS works just fine. Thank you for that.