desktop
desktop copied to clipboard
Authentication failed for a repository with restricted permission
The problem
I cannot push a commit to a remote repository or publish a new branch to a repository where I only have a permission to edit non-master-branch. Other repositories work fine.
Release version
Version 3.3.8-linux1 (x64)
Operating system
Ubuntu 22.04.3 LTS
Steps to reproduce the behavior
- Switch current repository to a repository where I only have a permission to edit non-master-branch
- Create new branch or make a local commit to my branch (already created)
- Push origin or publish branch
- Get an error message "Authentication failed."
Log files
The log file after the error reads "2024-03-21T14:37:40.590Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: mathlib4 - yoh-tanimoto (has token)"
Screenshots
No response
Additional context
No response
This sounds like an organization repository has restrictions enabled on third-party apps: https://github.com/shiftkey/desktop/blob/linux/docs/known-issues.md#i-cannot-access-repositories-under-my-organization
Sorry, but my organization does have approval of the access to the GitHub Desktop development app. Please see the attached screenshot. Could you please take a close look?
Please see the attached screenshot. Could you please take a close look?
I don't know which repository is erroring or it's erroring because I'm not seeing any Git operations in the logs - are you able to share more about the error message that you're seeing?
Thank you for reopening the issue.
In my case, the repository https://github.com/leanprover-community/mathlib4 is giving the error. I have the permission to edit non-master branches (and indeed I am able to edit on GitHub website). I get error when I try to push a commit or publish a branch using GitHub desktop. I attach a screenshot of the error message.
I get the same message even though
- I am logged in
- I log out and back in
- the repository is not archived
- I do not use SSH
I also attach today's log, where the last 7 lines are related with attempts to publish a branch. 2024-04-01.desktop..log
I'm having the same issue. And I'm seeing the same error in the logs:
2024-04-03T07:03:56.933Z - info: [ui] [Timing] Action 'create commit' for 'b-cubed-eu/simcuber' took 0.076s 2024-04-03T07:03:59.996Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: simcuber - PietrH (has token)
It's also failing for a specific repo for me, I'll see if I can figure out if the organisation has some restrictions setup.
Here are my logs:
2024-04-03.desktop.production.log
I'm running Version 3.0.5-linux1 (x64)
Other (completely open) repositories work, CLI works, I can log out and back in.
Is there any other information I can provide?
I've just replicated the issue in Version 3.3.12-linux2 (x64)
It seems to me the organisation has the OAuth permissions set for the development app:
Switching to SSH for this repo fixed the issue for me. Push and Pull operations are slower than I'm used to, but this might be because I upgraded to a newer version as well. I prefer using OAuth.