GitLab: why the pipeline or the job was refused
When you run a new pipeline through the API (POST /projects/:id/pipeline), GitLab answers 403 if your account may not create pipelines in the project at all, and otherwise 400 with its reason under message.base. Retrying, cancelling and running jobs answer in their own ways. All of this is from GitLab's source (lib/api/ci/pipelines.rb, lib/api/ci/jobs.rb and the steps that create a pipeline), read on October 24, 2026:
HTTP/1.1 400 Bad Request
{"message":{"base":["Reference not found"]}}
Running a new pipeline: 400
The reasons, in the order GitLab checks them:
Project is deleted!: the project is waiting to be deleted (pending deletion), so it takes no new pipeline (GitLab's abilities.rb, checked November 16, 2026).Pipelines are disabled!: GitLab CI/CD is turned off for the project (Settings > General > Visibility, project features, permissions, CI/CD in the Repository section). You may still ask for a pipeline, because GitLab keeps pipelines open to an external CI server, so the answer is this 400 and not a 403. Turn CI/CD back on and select Save changes (GitLab's abilities.rb and project_policy.rb, and the pipeline settings documentation).You cannot run pipelines before project import is complete.: the project is still being imported. Wait until the import has finished.You do not have sufficient permission to run a pipeline on 'main'. Please select a different branch or contact your administrator for assistance.: the branch is protected and your account may not merge or push to it (for a protected tag: may not create it). GitLab's documentation: on a protected branch, only users allowed to merge or push to it may run pipelines, run manual jobs, and retry or cancel jobs.Ref is ambiguous: a branch and a tag have that name.Reference not found: there is no branch or tag by that name in the project.Commit not found: GitLab could not find the commit for it.Insufficient permissions to set pipeline variables: the pipeline was given variables, and your role is below the project's minimum role to use them; see who may use pipeline variables.Missing CI config file: the branch has no.gitlab-ci.yml, or no file by the name set in the project's CI/CD settings.- An error in the configuration: when
.gitlab-ci.ymldoes not validate, the message is the first error GitLab found in it. The pipeline did not run. Review the workflow:rules configuration for the pipeline.:workflow:rulesleft out the whole pipeline. GitLab 17.2 and earlier saidPipeline filtered out by workflow rules.The resulting pipeline would have been empty. Review the rules configuration.: the jobs'rulesleft out every job, so there was nothing to run. Jobs in the.preand.poststages alone do not count as a pipeline. GitLab 17.3 to 19.2 ended the sentence withfor the relevant jobs., and 17.2 and earlier saidPipeline will not run for the selected trigger. The rules configuration prevented any jobs from being added to the pipeline.
In the web interface the two rules messages link to the documentation. The API sends them as plain text.
The Run pipeline form shows the message under the heading Pipeline cannot be run., and only the first one when there are several (GitLab's pipeline_new_form.vue). So the page reads Pipeline cannot be run. and then, for example, The resulting pipeline would have been empty. Review the rules configuration.
To run a pipeline GitLab will start: Pipelines and Jobs Inbox for GitLab CI, a plugin for JetBrains IDEs, offers Retry and Run only where GitLab says they are possible, and when GitLab will not start a new pipeline, keeps the dialog open with GitLab's reason.
Running a new pipeline: 403
{"message":"403 Forbidden"}: your role in the project may not create pipelines. A token without the api scope is refused with 403 too, but the answer says insufficient_scope; see which scope to add.
On GitLab.com, pipelines do not run in a private Free group with more than five users: the group is read-only, and GitLab may answer 404. The banner and how to lift it are under the free user limit (GitLab's read-only namespaces).
Retrying, cancelling and running jobs
- Retrying a pipeline (
POST …/pipelines/:id/retry) runs its failed and canceled jobs again.403 Forbidden: your account may not update the pipeline, or may not retry its jobs (on a protected branch, for example). In GitLab's current source, two more: 409Pipeline is already being retried, when another retry of the same pipeline is still running, and 409Error updating stale job, when a job changed while GitLab was retrying it. - Retrying a job (
POST …/jobs/:id/retry):403 Forbidden - Job is not retryableis about the job, not about your account. In the source, a job can be retried only if it succeeded, failed or was canceled, and was not already retried, is not archived and did not have its deployment rejected. So it has not finished yet, or someone already retried it (retry its newest run instead), or it is older than the instance's archive setting.403 Forbiddenwithout that reason is about your account, as above. On a merge train (GitLab Premium and Ultimate, from GitLab 19.3), the jobs of a merge train pipeline that has finished cannot be retried and give the same 403. The stage menus of a merge train pipeline sayMerge train pipeline jobs can not be retried, and retrying the whole pipeline (POST …/pipelines/:id/retry) gives422{"message":"Pipeline is not retryable"}. A retry would not put the merge request back on the train, so add it to the merge train again (GitLab's processable.rb and retry_pipeline_service.rb in ee/). - Running a manual job (
POST …/jobs/:id/play): 400Unplayable Job: it is not a manual or delayed job, it is archived, or it is neither waiting to be run nor finished. - Cancelling a pipeline or a job answers 200 even when there was nothing to cancel, with the pipeline or the job as it is. The source notes this for pipelines and plans to answer with an error in a later version of the API (gitlab-org/gitlab#519143, closed in April 2025; the note is still in the source and the answer is still 200). Read the status in the answer.
- On the pipelines page: when Retry or Cancel fails in a list of pipelines (the project's Pipelines page, and the lists on a commit and on a merge request), GitLab shows only
The pipeline could not be retried.orThe pipeline could not be canceled.The reason from the GraphQL answer goes to GitLab's error reporting, not to the page. It is one of the reasons above: for retrying403 Forbidden,Pipeline is already being retriedandError updating stale job; for cancellingInsufficient permissions to cancel the pipeline, orPipeline is not cancelablewhen nothing is left to cancel (the REST API answers 200 there); for bothThis endpoint has been requested too many times. Try again later.over the rate limit. To read it, send the same request as the GraphQL mutationpipelineRetryorpipelineCanceland look aterrors(GitLab's pipelines_app.vue, retry_pipeline_service.rb and cancel_pipeline_service.rb). - Run pipeline in a merge request: the Pipelines tab shows
An error occurred while trying to run a new pipeline for this merge request., orYou do not have permission to run a pipeline on this branch.for a 401 answer, only when the request itself fails. The tab asks GitLab to create the pipeline in the background, so most refusals come later: from GitLab 18.10 as the bannerPipeline creation failed. Please try again., without the reason. The reason is in the merge request's GraphQL fieldpipelineCreationRequests(statusanderror), for exampleCannot create a pipeline for this merge request: no commits to build.or one of the 400 reasons above. The REST APIPOST /projects/:id/merge_requests/:merge_request_iid/pipelineswithoutasyncanswers at once: 405 when the merge request has no commits, otherwise 400 with the reason, also when your role may not create pipelines (Insufficient permissions to create a new pipeline, not a 403). Withasync=trueit answers 202 and can still fail afterwards. The pipeline runs in the target project when you may create pipelines there and either may push to the source branch there or, for a fork, the target project lets fork pipelines run in it; otherwise in the source project (GitLab's pipelines_table_wrapper.vue, merge_requests.rb and create_pipeline_service.rb). - Too many requests: in the current source, retrying, cancelling and running are rate limited. Over the limit, GitLab answers 429. For jobs and for cancelling, it also sends a
Retry-Afterheader with the seconds to wait.
Pipeline schedules
A schedule runs with the permissions of its owner, the user who created it or last took ownership. Its problems show on the Build > Pipeline schedules page or in an email, not as a refused request (GitLab's pipeline schedules documentation and run_pipeline_schedule_worker.rb, read on November 3, 2026).
- Deactivated: each time the schedule runs, GitLab checks that the owner can still create pipelines in the project. If not, for example because the owner was blocked or removed from the project, it deactivates the schedule, which then shows as
Inactive, and emails the project owners and maintainers: "The owner of the pipeline schedule "Nightly" no longer has permission. The schedule is deactivated and cannot run. Take ownership and reactivate the schedule to resume pipeline runs." A maintainer or owner selects Take ownership next to the schedule, and it runs again with their permissions. - No pipeline and no message: when the project or one of its parent groups is archived, or scheduled for deletion, the schedule creates no pipeline. GitLab only writes it to its log.
- Run now: GitLab's documentation says you can run a schedule by hand once per minute. In the source, only the controller behind the older page checks this, and answers "You cannot play this scheduled pipeline at the moment. Please wait a minute." (pipeline_schedules_controller.rb). The Run button on today's Pipeline schedules page sends the GraphQL mutation
pipelineSchedulePlayinstead, which has no such check. When it fails, the page shows only "There was a problem playing the pipeline schedule.", without the reason, for example a protected branch that you may not merge or push to. The REST API answers 201, or 500 "Unable to schedule pipeline run immediately" when the run could not be queued (pipeline_schedules.vue and play.rb). A manual run uses your permissions, not those of the owner. - Later or less often than the cron: the pipeline schedule worker queues the schedules, so they cannot run more often than it runs:
*/5 * * * *on GitLab.com,3-59/10 * * * *by default on GitLab Self-Managed. The form says "Pipelines cannot run more frequently than the pipeline schedule worker cron setting (*/5 * * * *) allows." A daily limit for each schedule slows it further: on GitLab.com 24 pipelines a day on Free and 288 on paid tiers. On Free the Custom option then has the tooltip "Scheduled pipelines cannot run more frequently than once per 60 minutes. A pipeline configured to run more frequently only starts after 60 minutes have elapsed since the last time it ran." (interval_pattern_input.vue, CI/CD limits, GitLab.com settings). When many schedules start at once, they can start several minutes to over an hour late. - Too many schedules: a project can have 10 schedules by default, and on GitLab.com 10 on Free and 50 on paid tiers. Creating one more fails with "Maximum number of ci pipeline schedules (10) exceeded" (limitable.rb).
- Create pipeline schedule fails: the form shows the first reason GitLab returns, such as
Cron syntax is invalid,Cron timezone syntax is invalidorRef is ambiguous.Ref is ambiguousalso comes when no branch or tag has that name, not only when both do.The current user is not authorized to create the pipeline schedule: the target branch or tag is protected and you may not merge or push to it (for a tag: may not create it).The current user is not authorized to set pipeline schedule variables: the schedule has variables and your role may not use them; see who may use pipeline variables. The form showsAn error occurred while creating the pipeline schedule.only when the request itself fails. The REST API answers 400 with the reasons by field, for example{"message":{"cron":["syntax is invalid"]}}(GitLab's pipeline_schedules_form.vue, base_save_service.rb and pipeline_schedule_policy.rb). - No Edit button: only the schedule owner sees Edit. A Maintainer or Owner of the project sees Take ownership instead and has to take the schedule over first; a Developer who is not the owner can do neither. Through the REST API the update answers
403 Forbidden. When you change the target to a protected branch or tag that you may not merge or push to, the answer isThe current user is not authorized to update the pipeline schedule(GitLab's pipeline_schedule_actions.vue and the documentation).
What to do
- Reference not found: check the branch or tag name, and push the branch first if it exists only in your clone.
- Not allowed on a protected branch: ask a maintainer, or check who may merge or push to the branch under Settings > Repository > Protected branches.
- The rules messages: look at the rules for this kind of pipeline. A pipeline run through the API has
CI_PIPELINE_SOURCEapi(from the New pipeline button:web), so rules that only allowpushormerge_request_eventleave it out. - Missing CI config file: add
.gitlab-ci.ymlto that branch, or check the file name in the project's CI/CD settings. - Job is not retryable: refresh and look at the job's newest run. If it is still running, wait for it.
- 409 on retry: wait for the other retry to finish, refresh, then retry what is still failed.
- 429: wait before trying again: the number of seconds in
Retry-After, when GitLab sends it.
GitLab pipelines in IntelliJ IDEA
Pipelines and Jobs Inbox for GitLab CI, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists your GitLab projects' pipelines with their jobs and logs, and with Pro retries, cancels and runs them. In the job list it offers Retry and Run only where GitLab says they are possible (from version 1.0.21, Run only where GitLab says your account may run the job). When GitLab will not start a new pipeline, the dialog stays open with GitLab's reason, such as the rules messages above. When GitLab refuses another change, the plugin says so with GitLab's words: for 403, that your role or a protected branch (from version 1.0.21, also a protected environment) may not allow it; at the request limit, to wait a minute (from version 1.0.21, when GitLab asks for longer, the time it opens again). From version 1.0.15, for 403 "Job is not retryable", it says instead that GitLab will not run that job again and to refresh to see its latest run. Reading is free; retrying, cancelling and running are Pro (US$1.50 a month, with a 30-day trial).
Get it on JetBrains Marketplace
GITLAB is a trademark of GitLab Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by GitLab Inc. or JetBrains.
More: GitLab "Insufficient permissions to set pipeline variables" · GitLab job log refused or empty (403, 404) · GitLab job dropped as stuck or over its timeout · GitLab "You are not authorized to run this manual job" · GitLab pipeline failed with no jobs · GitLab "insufficient_scope" · GitLab 401 "invalid_token" · GitLab 404 "Project Not Found" · GitLab 404 "Group Not Found" · GitLab pipeline plugins for IntelliJ IDEA, compared · 日本語