GitHub Actions "deployment status write denied"
Updating a deployment status (in_progress, success, failure) via the API requires deployments: write. Without it the status update is rejected, which can leave a deployment stuck in pending. This is a permission gap.
What this error means
A step that posts a deployment status fails with a 403 resource-not-accessible error, and the deployment never reflects its final state.
github-actions
Error: Resource not accessible by integration
POST /repos/owner/repo/deployments/123/statuses -> 403Common causes
Missing deployments: write
The job token cannot write deployment statuses without the deployments scope.
Top-level permissions strip deployments
A restrictive top-level permissions block removes the deployments scope from the job.
How to fix it
Grant deployments: write
- Add deployments: write to the job permissions.
- Confirm no top-level permissions block removes it.
- Re-run; the status update now succeeds.
.github/workflows/deploy.yml
deploy:
permissions:
deployments: write
contents: readHow to prevent it
- Grant deployments: write on jobs that post deployment statuses.
- Audit top-level permissions so they do not silently strip deployments.
Related guides
GitHub Actions "Failed to create deployment" status errorFix the GitHub Actions "Failed to create deployment" error - the deployments API call failed due to permissio…
GitHub Actions "The deployment branch is not allowed"Fix the deployments-API error "The deployment branch is not allowed" when creating a deployment via the API f…
GitHub Actions deployment "environment URL not set"Fix a GitHub Actions deployment where the environment URL is blank - the url value resolved to empty because…