question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Able to fetch/pull but not push.

See original GitHub issue

Describe 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

  1. Click on “Publish branch”
  2. 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:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
tierninhocommented, May 22, 2020

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!

0reactions
orehmanecommented, May 22, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git push not working but git pull does work on remote branch
One of the developers in my team is having the following issues. They have the ability to pull a remote branch ...
Read more >
Git Pull works but push doesn't - Reddit
First time working with Gitlab repo. git pull, add, commit etc works -? Git pull does not work. no error, no response its...
Read more >
git fetch, pull, push, & sync - Visual Studio (Windows)
Fetch, pull, push, and sync in Visual Studio by using Git or Azure DevOps.
Read more >
What's the difference between "git fetch" and "git pull"?
Both 'git fetch' and 'git pull' download data from a remote repository. But the differ in what they do with the downloaded data....
Read more >
Git - git-pull Documentation
When not possible, refuse to merge and exit with a non-zero status. ... git clone, git fetch and git pull, but not git...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found