Fear of the 'undefined'

github-actions[bot] denied access to repo

github, github-actions
Posted 05/10/2022

I have been working on setting up GitHub Pages for myself and trying out a few themes. Finally settled on the chirpy theme. Chirpy has a starter project that you can generate your repository from. So off I went creating a new repo based on the starter project, pulled my new repository down, made a few changes, committed the changes and then pushed my changes.

Pretty painless process surprisingly which is awesome.

The only issue is that chirpy requires the use of GitHub actions to do the build/deploy phase. No problem, Github Actions are enabled for repositories by default. Watching the actions run after pushing my change only to see that it failed! Clicking into the failed continuous-delivery job to see the console logs and it has the following at the end.

cd-failed-deploy

My first thought is that I need to grant the github-actions[bot] access to my repository, but how? Did some quick googling and basically nothing on how to give the bot access to my repository so that it can push changes. Looked around in my repositories settings a bit and finally stumbled upon the Workflow permissions section under Settings -> Actions -> General.

settings-actions-general

Under the Workflow permissions section the value Read repository contents permission is selected which only allows read access for the github-actions[bot]. So simply changing the selection to Read and write permissions and saving to grant the github-actions[bot] read/write access to my repository.

settings-actions-general

From there, head back to my failed job, click the Re-run jobs dropdown, then Re-run all jobs for the job to run again. This time the action completed without failure and I could complete the setup of the chirpy theme and I am off an running!