Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to approve organization access? #948

Open
Arcalise08 opened this issue Oct 23, 2023 · 14 comments
Open

How to approve organization access? #948

Arcalise08 opened this issue Oct 23, 2023 · 14 comments
Labels
meta oauth-app-restrictions Tracking problems related to OAuth

Comments

@Arcalise08
Copy link

I'm an admin of my organization. And when i login to this fork of github desktop, It has me link my account which mentions my organization with a green checkmark. But when i clone, It says im not authenticated. I saw the known issues mention something like this. And it says an admin needs to approve the app. But its not requesting anything for me to approve. Is that something i need to do? My other apps automatically submit a request when i login to them.

@shiftkey
Copy link
Owner

I need more details from the application to be able to troubleshoot further. Please check the logs created at ~/.config/GitHub\ Desktop/logs/ from around the time of the issue to see if there's any helpful messages that might explain the underlying behaviour.

@Arcalise08
Copy link
Author

Its not really an issue as much as it is a question.

If i remove the Third-party application access policy restrictions. Everything works perfectly. I don't want to do that as a long term solution though. And its not popping up under my organization to approve the application. I wasnt sure if there was something more I had to do so that it pops up in my Third-party application access policy screen in github.

@Arcalise08
Copy link
Author

Arcalise08 commented Oct 26, 2023

Heres the relevant logs

2023-10-22T21:37:54.844Z - info: [ui] [Welcome] advancing to step: ConfigureGit
2023-10-22T21:37:54.867Z - info: [ui] [Welcome] no sign in step found. ignoring...
2023-10-22T21:37:54.877Z - info: [ui] [Welcome] no sign in step found. ignoring...
2023-10-22T21:37:55.101Z - info: [ui] Subscribed 'Arcalise08' to Alive channel
2023-10-22T21:38:36.934Z - error: [ui] Failed to look up repository clone info for 'https://github.com/Tiger-Correctional-Services/Core.git'
Error: Although you appear to have the correct authorization credentials, the `Tiger-Correctional-Services` organization has enabled OAuth App access restrictions, meaning that data access to third-parties is limited. For more information on these restrictions, including how to enable this app, visit https://docs.github.com/articles/restricting-access-to-your-organization-s-data/
    at _t (/home/arcalise08/webpack:/[name]/app/src/lib/http.ts:178:11)
    at gn.fetchRepositoryCloneInfo (/home/arcalise08/webpack:/[name]/app/src/lib/api.ts:789:11)
    at Object.clone [as onSubmit] (/home/arcalise08/webpack:/[name]/app/src/ui/clone-repository/clone-repository.tsx:710:11)

In my own OAuth applications i can see that it does have organization access

image

But its not requesting access in my organization

image

Hopefully thats enough info to figure out what the issue is. Apologizes if its something simple im missing here.

@LarveyOfficial
Copy link

Can confirm this issue still occurs, same error as stated above.

@1vanK
Copy link

1vanK commented Nov 18, 2023

Same problem

@1vanK
Copy link

1vanK commented Nov 18, 2023

I just can't push commits to my organizations repositories (I can push to my personal repositories). In a organization settings, I can click Remove restrictions button and this solves the problem. In Windows I have no this problem.

Снимок экрана от 2023-11-18 20-51-22

I also tried clearing all permissions in my personal profile settings and authorizing the app again and allowing access to all organizations, but that didn't help.

@Arcalise08
Copy link
Author

I just can't push commits to my organizations repositories (I can push to my personal repositories). In a organization settings, I can click Remove restrictions button and this solves the problem. In Windows I have no this problem.

Снимок экрана от 2023-11-18 20-51-22

I also tried clearing all permissions in my personal profile settings and authorizing the app again and allowing access to all organizations, but that didn't help.

Yeah I did mention removing restrictions works. But if you working in a larger organization you're not going to want to leave restrictions off. That's a huge security risk

@1vanK
Copy link

1vanK commented Nov 18, 2023

My Linux distribution is Linux Mint 21.2, if that makes any difference. Used binary: GitHubDesktop-linux-amd64-3.3.3-linux2.deb

@shiftkey shiftkey added the meta label Nov 27, 2023
@theofficialgman
Copy link

likely a duplicate of #217

@shiftkey shiftkey added the oauth-app-restrictions Tracking problems related to OAuth label Feb 25, 2024
@kov-lucas
Copy link

Same issue here

@Amsoht
Copy link

Amsoht commented May 24, 2024

same issue here

@ken1th
Copy link

ken1th commented Aug 20, 2024

Still have the issue

@Arcalise08
Copy link
Author

Arcalise08 commented Oct 9, 2024

My issue was solved with this answer below

@bherbruck if it not showing in your org's third-party list then, you need to go to your Account Setting -->Integrations -->Applications -->Authorized OAuth Apps --> Click on "The GitHub Desktop Development App" --> Under Organization access sent a request to your Org's.

Originally posted by @kailashzversal in desktop#13226 (comment)

@meeg
Copy link

meeg commented Nov 19, 2024

When I was trying to set up GH Desktop a few months ago I had been having the same problems as everyone else - removing restrictions for all apps works but is not desirable, can't find any way to request app-specific access, if I follow GitHub's instructions for requesting access I don't get a "request access" button. So I gave up, because most of my work happens in organization repos..

Today I updated GH Desktop and opened it again to give it a try, and I was having the same problems (unable to fetch/pull org repos), but then I thought to sign in+out of GitHub, and I was able to request+grant access as part of that process? To be specific:

  • Go into the GH Desktop account options (File->Options, "Accounts" tab). It shows that I'm signed into Github.com.
  • Sign out ("Sign out of GitHub.com" button).
  • Sign in ("Sign into GitHub.com" button). It redirects to the web browser.
  • I authenticate as usual. I then get a screen requesting me to authorize the app, similar to below (from OAuth scopes by repository (or organization) isaacs/github#731 - to be clear that issue is not relevant, it's just a good screenshot and I don't want to share my own account info). I was able to grant organization access using the buttons on this screen.

image

I'm not sure if this was always a good solution, or something changed on GitHub's end. Unfortunately I can't easily test this, because I don't see an easy way to remove access (I can deny it, but I cannot get back to the original state before I requested+granted it). But maybe this will work for other people, and if it works it ought to go in the documentation under https://github.com/shiftkey/desktop/blob/linux/docs/known-issues.md#i-cannot-access-repositories-under-my-organization?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta oauth-app-restrictions Tracking problems related to OAuth
Projects
None yet
Development

No branches or pull requests

9 participants