Lesstep
GitHub Actions · Checked November 3, 2026

GitHub Actions: "Resource not accessible by integration"

The token the step used, usually the job's GITHUB_TOKEN, does not have the permission that one API call needs, so GitHub answered 403. The fix is usually one line under permissions:. Which line depends on the call, and on what started the run.

What it looks like

From a public run on November 1, 2026, where actions/configure-pages failed:

##[error]Get Pages site failed. Please verify that the repository has Pages enabled and configured to build using GitHub Actions, or consider exploring the `enablement` parameter for this action. Error: Resource not accessible by integration - https://docs.github.com/rest/pages/pages#get-a-apiname-pages-site

The same refusal as other tools print it:

GraphQL: Resource not accessible by integration (removeLabelsFromLabelable)
gh: Resource not accessible by integration (HTTP 403)
RequestError [HttpError]: Resource not accessible by integration

Finding the permission it needed

  1. Open the failed job, expand Set up job, then GITHUB_TOKEN Permissions. It lists what the token had. In the Pages run above it had only:
    GITHUB_TOKEN Permissions
    Contents: read
    Metadata: read
  2. The 403 response carries an X-Accepted-GitHub-Permissions header that names what the endpoint accepts. Commas join permissions needed together (pull_requests=write,contents=read), and a semicolon separates alternatives. actions/github-script prints the response headers with the error; one scheduled workflow that created an issue showed 'issues=write' (memphis #638). With gh, -i prints the headers even when the call fails:
    gh api -i "repos/$GITHUB_REPOSITORY/pages"
  3. The header uses API names with an underscore. In the workflow they are written with a hyphen: pull_requests=write is pull-requests: write.

Why the permission was missing

The permission for common tasks

Grant it on the job that makes the call, and repeat the reads that job still needs, since everything not listed becomes none:

jobs:
  label:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write

What no permission fixes

See failed jobs from IntelliJ IDEA

Pipeline Inbox for GitHub Actions Workflows, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the runs of all your repositories in an IDE tool window, with their jobs and steps, so the step that was refused stands out, and your current branch's runs are in the status bar. Reading is free; re-running failed jobs, cancelling, running workflows and reviewing deployments are Pro (US$1.50 a month, with a 30-day trial).

GitHub and GitHub Actions are trademarks of GitHub, Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with, sponsored or endorsed by GitHub, Inc. or JetBrains.

More: "Unable to resolve action" · "The operation was canceled" · "Must have admin rights to Repository" · Re-running jobs with debug logging · GitHub Actions plugins for IntelliJ IDEA compared · 日本語