Github Actions Failing – Error: Resource not accessible by integration

I suddenly came across various Github Actions across a number of different repos that all started failing at the same time, with errors similar to the below:

Error: Resource not accessible by integration
Exception: {
 "error": "403/Unknown Error:HttpError",
 "from": "undefined/Error",
 "message": "There was an error getting change files for repo:reponame owner:PR-Owner pr:593",
 "payload": "Resource not accessible by integration"
}

I couldn’t work out if something had changed on the Github side, in terms of the permissions the default GITHUB_TOKEN allows, or if someone on one of the dev teams had been fiddling with their repo permissions.
The solution here was to add additional permissions to the Action, either at the top level or within a specific job. In my case it was permissions around the repo contents and pull requests.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.