GitHub Connector: repository/PR/file reads work, but refs, commits, compare and workflow runs return 403
What issue are you seeing?
The GitHub Connector has selective read-access failures on a private repository under a GitHub organization.
The connector is successfully authenticated and can perform several READ-ONLY operations against the same repository:
- repository metadata retrieval works;
- pull request metadata retrieval works;
- repository contents/files retrieval works;
- files from the default branch can be read.
However, other READ-ONLY GitHub operations consistently fail with:
403 Resource not accessible by integration
The failing operations include:
GET /repos/<org>/<private-repo>/git/ref/heads/main- fetching a known commit through the commits API
- comparing two known commits through the compare API
- retrieving workflow runs associated with a known commit
The GitHub App is installed, repository access is configured as All repositories, and the GitHub Connector has already been reconnected.
This does not appear to be a general repository authorization failure because metadata, PRs and file contents continue to work in the same repository.
No WRITE operation is required to reproduce the problem.
Sensitive repository names, tokens, secrets, installation IDs and internal commit identifiers have been intentionally redacted.
What steps can reproduce the bug?
- Connect ChatGPT/Codex to GitHub using the GitHub Connector.
- Install/authorize the GitHub App for a private repository under a GitHub organization.
- Configure repository access as
All repositories. - Confirm that repository metadata can be retrieved.
- Confirm that pull request metadata can be retrieved.
- Confirm that repository files can be read through the contents API.
- Perform a READ-ONLY request equivalent to:
GET /repos/<org>/<private-repo>/git/ref/heads/main
- Observe:
403 Resource not accessible by integration
- Fetch a known commit SHA through the commits API.
- Observe the same:
403 Resource not accessible by integration
- Compare two known commit SHAs through the GitHub compare API.
- Observe the same 403.
- Request GitHub Actions workflow runs associated with a known commit.
- This request has also returned:
403 Resource not accessible by integration
Reconnecting the GitHub Connector did not resolve the issue.
No branch modification, commit, merge, rebase, deployment or other WRITE operation is necessary to reproduce it.
What is the expected behavior?
The GitHub Connector should be able to perform the required READ-ONLY Git operations when the installed GitHub App has sufficient repository read access.
Since the same connector can already retrieve repository metadata, pull request metadata and repository contents, Git refs, commit retrieval and commit comparison should also work when covered by the granted GitHub App permissions.
If one of these endpoints requires an additional permission that is unavailable to the current installation token, the connector should return a clear diagnostic identifying the missing permission rather than only:
Resource not accessible by integration
Additional information
This issue blocks a safe Git rebaseline audit.
The connector can inspect the pull request, its changed files and the production code involved, but it cannot authoritatively verify:
- the current HEAD of
main; - ahead/behind status;
- the official commit comparison;
- the current branch-to-main relationship.
Our engineering workflow intentionally operates fail-closed, so WRITE operations cannot proceed until the Git graph is independently verified.
This report is NOT requesting broad or unrestricted GitHub permissions. The goal is to have the connector correctly use the minimum permissions required for these READ-ONLY operations, or clearly report which permission is missing.
Troubleshooting already performed:
- GitHub Connector connection confirmed;
- GitHub App installation confirmed;
- private repository access confirmed;
All repositoriesconfigured;- connector reconnection performed;
- repository metadata re-tested successfully;
- PR metadata re-tested successfully;
- repository contents re-tested successfully;
- Git refs re-tested and still return 403;
- commit retrieval re-tested and still returns 403;
- commit comparison re-tested and still returns 403;
- workflow-run retrieval has also returned 403.
Potentially related reports:
- openai/codex#21387
- openai/codex#36042
Could the maintainers confirm whether repository contents, pull request metadata, Git refs, commits, commit comparison and GitHub Actions requests currently use different installation-token permission paths inside the GitHub Connector?