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

Unable to set up auto-updating of new package #1148

Open
christeredvartsen opened this issue Jan 6, 2021 · 15 comments
Open

Unable to set up auto-updating of new package #1148

christeredvartsen opened this issue Jan 6, 2021 · 15 comments

Comments

@christeredvartsen
Copy link

I'm struggling to set up auto-updating of the following package:

https://packagist.org/packages/navikt/coding-standard

Packagist have been given access to the org where the repo is. When trying to trigger a manual account sync I'm seeing the following error:

An unexpected error occurred during sync.

I'm not sure what is going on here. I have other repos in the same org that I have enabled auto-updating on without issues.

@christeredvartsen
Copy link
Author

Checked again now to see if was some temporary error, but the error message is still the same as seen in the screenshot:

Screenshot 2021-01-11 at 13 46 16

@Seldaek
Copy link
Member

Seldaek commented Jan 13, 2021

The issue I'm seeing on our end is this:

`GET https:\/\/api.github.com\/repos\/navikt\/coding-standard-php\/hooks` resulted in a `403 Forbidden` response:
{
  \"message\": \"Resource protected by organization SAML enforcement. You must grant your OAuth token access to this orga ...

Could it be something special you have enabled on your org?

@stof
Copy link
Contributor

stof commented Jan 13, 2021

maybe your organization uses the third-party application access policy features of Github, and you haven't authorized the Packagist github app on your org.

@christeredvartsen
Copy link
Author

We have three other repos that is automatically updated in the same org. Looks like that app has access:

image

@christeredvartsen
Copy link
Author

It might be that we have enabled forced 2FA on the organization after I initially set up the Packagist integration. I can try to re-approve the app and see if that helps.

@stof
Copy link
Contributor

stof commented Jan 13, 2021

@christeredvartsen is your organization using the SAML single sign-on feature of GitHub Enterprise Cloud ?

@christeredvartsen
Copy link
Author

is your organization using the SAML single sign-on feature of GitHub Enterprise Cloud ?

Yes, but it has been doing so since we initially set this up a couple of years back.

@christeredvartsen
Copy link
Author

The auto-updating of one of our other packages worked a couple of days ago btw, so the only repo that it doesn't work with is the one mentioned above.

@christeredvartsen
Copy link
Author

Would love to get this sorted out. I can help debug on the GitHub-organization side if you need me to test something.

@Seldaek
Copy link
Member

Seldaek commented Jan 19, 2021

Can you try to set it up manually by using the instructions at Do not want to log in via GitHub and grant us webhook configuration access? on https://packagist.org/about#how-to-update-packages ?

@christeredvartsen
Copy link
Author

That seems to be working. Will I have to do this for all our future packages for this org?

@Seldaek
Copy link
Member

Seldaek commented Jan 19, 2021

I don't know as I am not sure what is going on here tbh. Not familiar at all with this SAML stuff, and I can't say I have time to dive into it atm.

@Messhias
Copy link

Messhias commented Oct 21, 2021

Still nowadays having this issue, and no, I don't know about SAML and etc and as @Seldaek told, we don't have time to dive into this.

@caendesilva
Copy link

caendesilva commented Dec 11, 2023

Having this issue too, for an organization. Getting "You must connect your user account to github to sync packages.", but I can't connect, as I can't log in as the organization.

Edit: I of course have double checked that the installed app on the organization has permissions to access the repo.

I can confirm that using the webhook works, and is at this point the simplest fix.

@stof
Copy link
Contributor

stof commented Jan 12, 2024

Based on https://docs.github.com/en/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/about-authentication-with-saml-single-sign-on#about-oauth-apps-github-apps-and-saml-sso, I think you need to have an active Saml SSO session for your organization at the time you ask Packagist to perform a sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants