Lesstep
GitHub Actions · Checked November 3, 2026

GitHub Actions: "Permission to ... denied to github-actions[bot]"

A git push in a workflow was refused. github-actions[bot] is the name GitHub shows for GITHUB_TOKEN, so the push went out with the job's own token, and that token could not write to the repository named in the message.

What it looks like

remote: Permission to grafana/grafana.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/grafana/grafana/': The requested URL returned error: 403
##[error]The process '/usr/bin/git' failed with exit code 128

This is from a weekly job in grafana #136263. Read two names in the first line: the repository after "Permission to" is where the push went, and the account after "denied to" is who git signed in as. If you meant to push with a token of your own and it still says github-actions[bot], go to 4.

1. The token was read only

Grant contents: write to the job that pushes, not to the whole workflow. The proposed fix for gemma builds the docs in one job and pushes gh-pages from a second, which is the only job with write access and runs no project code:

jobs:
  deploy:
    needs: generate
    permissions:
      contents: write

2. The run gets a read-only token whatever the workflow says

3. The push went to another repository

GitHub's documentation: "The token's permissions are limited to the repository that contains your workflow." No permissions line changes that. Compare the name after "Permission to" with your repository:

For another repository, use a GitHub App token (actions/create-github-app-token) or a fine-grained personal access token with write access to that repository, stored as a secret. Then check 4, because the checkout may still send its own token.

4. Your token was there, but the checkout's went out

actions/checkout saves its token in the local git config unless persist-credentials: false is set, and that saved header wins over a token written into the push URL. Three merged fixes from the last two months:

Either stop the checkout from saving its token, or hand your token to the checkout so the saved one is yours:

- uses: actions/checkout@v7
  with:
    persist-credentials: false

# or
- uses: actions/checkout@v7
  with:
    token: ${{ secrets.DEPLOY_TOKEN }}

Telling it apart

See failed jobs from IntelliJ IDEA

Pipeline Inbox for GitHub Actions Workflows, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the runs of all your repositories in an IDE tool window, with their jobs and steps, and your current branch's runs are in the status bar. Reading is free; re-running failed jobs, cancelling, running workflows and reviewing deployments are Pro (US$1.50 a month, with a 30-day trial).

GitHub and GitHub Actions are trademarks of GitHub, Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with, sponsored or endorsed by GitHub, Inc. or JetBrains.

More: "could not read Username for 'https://github.com'" · "Resource not accessible by integration" · "API rate limit exceeded for installation" · "Input required and not supplied" · GitHub Actions plugins for IntelliJ IDEA compared · 日本語