GitLab CI "This manual job ... cannot be run" in CI
A when: manual job cannot be started: its stage was skipped, a job it needs has not succeeded, or your role lacks permission to play it. Manual jobs are only playable once their prerequisites are met.
What this error means
The play button is disabled or clicking it returns "This job cannot be run" / "Playing the job is not allowed". The job stays in a manual or skipped state.
Job page
This job cannot be run because it does not have all the required prerequisites.Common causes
A prerequisite job has not succeeded
If the manual job needs an earlier job that failed or did not run, it cannot be played.
Insufficient permission to run the job
Running a protected or deployment manual job requires a role with permission for that environment or branch.
How to fix it
Satisfy the prerequisites
- Confirm every job the manual job
needshas succeeded. - Re-run any failed upstream jobs first.
- Then play the manual job.
.gitlab-ci.yml
deploy:
stage: deploy
when: manual
needs: ["build"]
script: ./deploy.shCheck protected environment permissions
For deployments to protected environments, ensure your role is allowed to deploy, or have a maintainer run it.
How to prevent it
- Keep manual jobs'
needschain green before expecting to play them. - Grant the right roles access to protected environments.
- Document who can run manual deployment jobs.
Related guides
GitLab CI merge request pipeline not created in CIFix GitLab merge request pipelines not being created in CI - jobs lack rules for merge_request_event, or work…
GitLab CI "needs: job ... is not defined" in CIFix GitLab "needs config can only reference other jobs ... is not defined" in CI - a needs entry names a job…
GitLab CI "downstream pipeline could not be created" in CIFix GitLab "downstream pipeline can not be created" in CI - a trigger job failed to start a child or multi-pr…