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.
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 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 stepecho "::add-path::/path"in a step- Old third-party action built on the deprecated toolkit
- Docs copied from before 2020
⚡ Quick fix
- Use
echo "X=value" >> "$GITHUB_ENV" - Use
echo "$PWD/bin" >> "$GITHUB_PATH" - Update the action that emits the command
Detailed fix by platform
GitHub Actions
- Remember that env set this way is visible in the NEXT steps:
run: echo "BUILD_ID=$RANDOM" >> "$GITHUB_ENV"thenrun: echo $BUILD_ID
Code examples
Environment files
- run: |
echo "BUILD_ID=$GITHUB_RUN_NUMBER" >> "$GITHUB_ENV"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- run: echo "build $BUILD_ID"How to diagnose
- Command — set-env or add-path?
- Source — Script or action?
- 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:
Similar errors
- API rate limit exceeded GitHub Actions: HttpError: API rate limit exceeded for installation ID 123456 / secondary rate limit
- 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
- 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
Most viewed in CI/CD
- The process '/usr/bin/git' failed with exit code 128 GitHub Actions: Error: The process '/usr/bin/git' failed with exit code 128
- This job is stuck because you don't have any active runners GitLab CI: This job is stuck because you don't have any active runners online or available with any of these tags assigned to them
- Resource not accessible by integration GitHub Actions: Error: Resource not accessible by integration (403)
Other ways to find it
Where this error sits
Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):
🧠 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.
Report a correction or suggest an improvement
Last updated 25 Oct 2026