Closed francorbacho closed 8 months ago
I didn't know it was needed. Were did you configure this setting?
It was failing for me (at least on private repos) with an authorization error without it. It was all configured in the job.yml
file like so:
name: Foo
on:
push:
pull_request:
jobs:
run-job:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- ...
I found an explanation at: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
You are probably using a "restricted" GITHUB_TOKEN
as mentioned in: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
I think we should explain when it's needed and why it's needed. As far as I understand, it's only needed when using a "restricted" GITHUB_TOKEN
.
Do you have the authorization error message? It might also help others to troubleshoot if we copy/paste the error message next to the solution.
Thanks!
I don't know why I have a restricted access GITHUB_TOKEN
, I don't think I configured it anywhere.
Anyhow, I have included the information you requested. Feel free to rearrange the information as you wish.
@francorbacho That's great, thank you! I made tiny updates. Thanks again for taking the time to help others 🤗
This was pretty confusing to me, and it looks like obvious information to provide to new users.