Skip to content
Discussion options

You must be logged in to vote

The steps below should help you fix this:

  1. Gave the workflow explicit write access. In the YAML I added:
    '''
    permissions:
    contents: write
    '''
    This grants the default GITHUB_TOKEN the rights it needs to push.

  2. Checked the repo‑wide default. Under Settings → Actions → General → Workflow permissions I flipped the radio button to Read and write permissions so new workflows inherit the correct scope.

  3. Purged the stale token cache. I re‑ran the job from scratch (Run workflow → branch → “Re‑run all jobs”) to make sure the freshly scoped token was used.

  4. (Fallback) Used a PAT when I needed cross‑repo pushes. For a separate automation that writes to another repo, I created a fine‑scoped Person…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by CS-Student-UT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Question Ask and answer questions about GitHub features and usage Misc General discussions about GitHub Actions that don't fit other found themes.
2 participants