github-actions-version-updater icon indicating copy to clipboard operation
github-actions-version-updater copied to clipboard

Fine grained tokens may need an extra "Actions" permission

Open jameshiew opened this issue 1 year ago • 0 comments

I created a fine grained PAT (personal access token) initially with just the permissions currently listed in the README. Using saadmk11/[email protected]

For Fine-grained Personal Access Token:

You need to create a Fine-grained Personal Access Token with these Repository permissions:

Contents: Read and write (To Push Changes to the Repository)
Workflows: Read and write (To Update GitHub Action workflow files)
Pull requests: Read and write (To Create Pull Requests)
Metadata: Read-only (Required by Above Permissions)

I got this error when running the workflow

Error: An error occurred while getting workflows for <my private repo>, GitHub API Response: {'message': 'Resource not accessible by personal access token', 'documentation_url': 'https://docs.github.com/rest/actions/workflows#list-repository-workflows', 'status': '403'}

I added "Actions" read only permission to the PAT and was able to get the action to succeed. Maybe this permission is needed in general, in which case could be added to the README?

Screenshot 2024-11-04 at 13 52 40

jameshiew avatar Nov 04 '24 13:11 jameshiew