workflow scope Git Origin: Build & delivery Last updated 12 Oct 2026

! [remote rejected] … (refusing to allow a Personal Access Token to create or update workflow `.github/workflows/x.yml` without `workflow` scope)

Your token can’t modify GitHub Actions workflow files without the workflow scope.

Exact message you may see without `workflow` scoperefusing to allow a Personal Access Token to create or update workflow
Seen on: Git

Meaning

Pushing changes under .github/workflows requires a classic PAT with the workflow scope, or a fine-grained token with Workflows write permission.

Common causes

  • PAT without workflow scope
  • OAuth app token without workflow permission

⚡ Quick fix

  1. Regenerate the token with the workflow scope
  2. Use gh auth refresh -s workflow

Detailed fix by platform

Git

  1. gh auth refresh -h github.com -s workflow

How to diagnose

  1. Token — Scopes include workflow?
  2. Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):

401 — HTTP 401 Unauthorized (HTTP)401AADSTS50076 — Azure AD (Entra ID): AADSTS50076 / AADSTS50079 — multi-factor authentication required (Azure)AADSTS50076AADSTS50126 — AADSTS50126: Error validating credentials due to invalid username or password (Azure)AADSTS50126AADSTS700016 — Azure AD (Entra ID): AADSTS700016 Application not found in the directory (Azure)AADSTS700016auth/invalid-credential — Firebase Auth: auth/invalid-credential (auth/wrong-password, auth/user-not-found, auth/invalid-login-credentials) (Authentication)auth/invalid-credenti…Authentication failed — fatal: Authentication failed for 'https://github.com/x/y.git/' (Git)Authentication failedCould not load the default credentials — Google Cloud: Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started (Google Cloud / Firebase)Could not load the de…DefaultAzureCredential failed — DefaultAzureCredential failed to retrieve a token from the included credentials / ManagedIdentityCredential authentication unavailable (Azure)DefaultAzureCredentia…workflow …

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.