release-please failed: Error creating Pull Request


This post goes over how to fix the GitHub Actions error:

release-please failed: Error creating Pull Request: Resource not accessible by integration


The root cause is that GitHub’s default repository workflow permissions changed from write to read in 2022.

The fix is to go to repository Settings > Code and automation > Actions > General > Workflow permissions and check Allow GitHub Actions to create and approve pull requests.

You will also need to toggle Read and write permissions or update your workflow permissions:

# .github/workflows/release-please.yml
  contents: write
  pull-requests: write

See issue for more information.

Please support this site and join our Discord!