The set-env command is disabled CI/CD Origin: Build & delivery Last updated 25 Oct 2026

GitHub Actions: Error: Unable to process command '::set-env name=X::y' successfully. The `set-env` command is disabled

A script or old action uses ::set-env / ::add-path, which GitHub disabled; write to $GITHUB_ENV and $GITHUB_PATH instead.

Exact message you may see The `set-env` command is disabledUnable to process command '::set-envThe `add-path` command is disabledPlease upgrade to using Environment Files or opt into unsecure command execution
Seen on: GitHub Actions

Meaning

The workflow commands were removed for security. Use echo "NAME=value" >> "$GITHUB_ENV" and echo "/my/bin" >> "$GITHUB_PATH". The values are available in later steps, not in the current one. Setting ACTIONS_ALLOW_UNSECURE_COMMANDS re-enables them but is not recommended.

Common causes

  • echo "::set-env name=X::value" in a step
  • echo "::add-path::/path" in a step
  • Old third-party action built on the deprecated toolkit
  • Docs copied from before 2020

⚡ Quick fix

  1. Use echo "X=value" >> "$GITHUB_ENV"
  2. Use echo "$PWD/bin" >> "$GITHUB_PATH"
  3. Update the action that emits the command

Detailed fix by platform

GitHub Actions

  1. Remember that env set this way is visible in the NEXT steps: run: echo "BUILD_ID=$RANDOM" >> "$GITHUB_ENV" then run: echo $BUILD_ID

Code examples

Environment files

yaml
- run: |
    echo "BUILD_ID=$GITHUB_RUN_NUMBER" >> "$GITHUB_ENV"
    echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- run: echo "build $BUILD_ID"

How to diagnose

  1. Command — set-env or add-path?
  2. Source — Script or action?
  3. Scope — Used in a later step?

🔧 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):

API rate limit exceeded — GitHub Actions: HttpError: API rate limit exceeded for installation ID 123456 / secondary rate limit (CI/CD)API rate limit exceed…Cache not found / Unable to reserve cache — GitHub Actions: Cache not found for input keys: npm-Linux-abc123 / Failed to save: Unable to reserve cache with key, another job may be creating this cache (CI/CD)Cache not found / Una…Credentials could not be loaded — GitHub Actions: Error: Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers (CI/CD)Credentials could not…Node.js 16 actions are deprecated — GitHub Actions: Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3 (CI/CD)Node.js 16 actions ar…set-output command is deprecated — GitHub Actions: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files (CI/CD)set-output command is…the attribute version is obsolete — WARN: the attribute `version` is obsolete, it will be ignored (Docker)the attribute version…Unable to download artifact — GitHub Actions: Error: Unable to download artifact(s): Artifact not found for name: build (CI/CD)Unable to download ar…Unable to process file command — GitHub Actions: Error: Unable to process file command 'output' successfully. Invalid format 'x' (CI/CD)Unable to process fil…The set-e…

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.