Skip to content
Latchkey

peter-evans/create-pull-request "GitHub Actions is not permitted to create or approve pull requests"

A repo or org setting controls whether GITHUB_TOKEN can open PRs. When it is off, create-pull-request fails even with pull-requests: write granted.

What this error means

create-pull-request fails with "GitHub Actions is not permitted to create or approve pull requests".

github-actions
Error: GitHub Actions is not permitted to create or approve pull requests.
##[error]GitHub Actions is not permitted to create or approve pull requests.

Common causes

Org/repo toggle disabled

Settings > Actions > "Allow GitHub Actions to create and approve pull requests" is off.

Workflow missing pull-requests: write

Even with the toggle on, the token needs pull-requests: write to open a PR.

How to fix it

Enable the toggle and grant the scope

  1. In Settings > Actions > General, enable "Allow GitHub Actions to create and approve pull requests".
  2. Add pull-requests: write and contents: write to the workflow permissions.
  3. Re-run; the PR is created.
.github/workflows/auto-pr.yml
permissions:
  contents: write
  pull-requests: write
steps:
  - uses: peter-evans/create-pull-request@v6
    with:
      branch: automated/update
      title: Automated update

How to prevent it

  • Set the org-level Actions PR toggle once for all repos that automate PRs.
  • Use a dedicated app or PAT when PRs must trigger downstream workflows.

Frequently asked questions

What causes ""not permitted to create or approve pull requests""?
Settings > Actions > "Allow GitHub Actions to create and approve pull requests" is off.
How do I fix "not permitted to create or approve pull requests"?
Enable the toggle and grant the scope

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card