Lesstep
GitHub Actions · Checked November 3, 2026

GitHub Actions: "refusing to allow a GitHub App to create or update workflow"

GitHub refused to write a commit that adds or changes a file under .github/workflows, because the token has no right to write workflow files. Most of these come from scheduled jobs that keep a fork in step with its upstream, on the day the upstream edits one of its workflows.

What it looks like

From git push (promxy #1):

! [remote rejected] master -> master (refusing to allow a GitHub App to create or update
  workflow `.github/workflows/build.yml` without `workflows` permission)

From gh repo sync or the merge-upstream API (sparkDash #1):

gh: refusing to allow a GitHub App to create or update workflow `.github/workflows/publish-image.yml` without `workflows` permission (HTTP 422)

The words after "refusing to allow" name the kind of token:

When the check applies

GitHub's list of OAuth scopes says: "Workflow files can be committed without this scope if the same file (with both the same path and contents) exists on another branch in the same repository." What counts is the workflow files in the commits you push, not what you meant to change:

GITHUB_TOKEN can never do it

workflows is not among the permissions a workflow can set for GITHUB_TOKEN, so no permissions block helps. The merge-upstream API that gh repo sync uses is checked the same way (github-code-monkey-bot #12).

What to do

Before you hand a sync job a stronger token, look at what it will push. promxy's job ran git reset --hard upstream/master and force-pushed; with a token that could write workflows, it would have deleted the fork's own mirror-sync.yml and stopped its own schedule after the first success. Every scheduled run had failed until then, and GitHub had disabled the workflow for inactivity.

On your own machine

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: GitHub: a fork cannot be synced · "could not read Username for 'https://github.com'" · "Permission to ... denied to github-actions[bot]" · "Resource not accessible by integration" · "Invalid workflow file" · GitHub Actions plugins for IntelliJ IDEA compared · 日本語