Can't fetch commits to a release from private repos

Hi guys,

I’m new on Sentry and I’m getting an error on Sentry 9.0.0 when I try to set commits through the sentry-cli using a GitHub private repository:

Unable to Fetch Commits

We were unable to fetch the commit log for your release ( 934f4990dffcaea056732c1e9cf0efdf3de276bd ) due to the following error:

GitHub returned a 404 Not Found error. If this repository exists, ensure you have the appropriate write permissions for it, and that Sentry is an authorized OAuth app in your Github account settings (Sign in to GitHub · GitHub).

I’ve tested everything is well connected with GitHub, in fact I deleted the identity and reconnected again, but still the same.
This occurs only with private repositories, if I use a public one it works perfectly and the commits are shown on the release.

Any thoughts?

We have the exact same issue

Is this self-hosted?

@zeeg Yes, It’s deployed on GCP with HA.

Have you enabled access to the Sentry app for the given org? GitHub by default doesn’t grant org access in some cases.

Yes, access is enabled.

I’m not sure what else to tell you. Repos are scoped to the repo permission with the added oauth-per-org barrier, and when the token doesn’t have permission GitHub returns a 404.