-
Notifications
You must be signed in to change notification settings - Fork 233
style workflow fails due to lack of repository permissions #774
Description
I found this issue on a private repo, but set up a dummy repo to test my hypotheses here. The style action fails with a 403 (forbidden) error:
remote: Permission to thisisnic/testingghactions.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/thisisnic/testingghactions/': The requested URL returned error: 403
Error: Process completed with exit code 128.
I believe that the cause of it could be a change in the default permissions that the GITHUB_TOKEN uses from February, which switched permissions from read/write to read-only.
Describe the bug
"Commit and push changes" step of 'style' action fails
To Reproduce
Failed build here: https://github.com/thisisnic/testingghactions/actions/runs/6703972117/job/18215481594
Expected behavior
The step successfully pushes changes to the branch
Additional context
If I add write permissions to the pull-requests, this issue persists: https://github.com/thisisnic/testingghactions/actions/runs/6704107978/job/18215883920
If I add write permissions to the contents, then the job now works: https://github.com/thisisnic/testingghactions/actions/runs/6704148262/job/18216003844
After doing more digging around, this looks like it's basically the same issue as was fixed for the pkgdown build-and-deploy step actually; I'll submit a PR.