Skip to content
Latchkey
GitLab CI

GitLab CI/CD pipeline errors - fixed.

Fix common GitLab CI/CD failures: .gitlab-ci.yml syntax, runner registration, job and stage errors, caching, and authentication.

Pipeline config

.gitlab-ci.yml syntax, stages, rules.

"invalid: variable"Fix GitLab CI "this GitLab CI configuration is invalid: variable" - a malformed variables block, a non-string… "contains unknown keys"Fix GitLab CI "config contains unknown keys" and "unknown keyword" errors - a misspelled or misplaced keyword… "Found errors in your .gitlab-ci.yml"Fix GitLab "Found errors in your .gitlab-ci.yml" from the CI Lint tool - the umbrella message listing every k… "Invalid YAML"Fix GitLab CI "Invalid configuration format" and raw YAML parse errors in .gitlab-ci.yml - bad indentation, t… "needs ... not defined"Fix GitLab CI "job needs X, but X is not defined in prior stages" - a needs target that does not exist or sit… "at least one visible job"Fix GitLab "jobs config should contain at least one visible job" - when every job is hidden (dot-prefixed), f… "at least one visible job"Fix GitLab CI "jobs config should contain at least one visible job" - every job is hidden, a template, or exc… "needs" errorsFix GitLab CI needs errors - "job needs X which is not defined" and "needs config can only reference jobs in… "rules" mistakesFix GitLab CI rules/only/except mistakes - "may not be used with rules", duplicate pipelines, and jobs that r… "may not be used with rules"Fix GitLab CI "jobs:<name> config key may not be used with rules: only" - rules is mutually exclusive with on… "configuration is invalid"Fix "This GitLab CI configuration is invalid" - the umbrella error GitLab shows when .gitlab-ci.yml fails Pip… "workflow:rules" blocks allFix GitLab CI workflow:rules that silently drop every pipeline - when no top-level rule matches the push, MR,… "did not find expected key"Fix GitLab CI "yaml invalid: did not find expected key" - a raw YAML parse failure in .gitlab-ci.yml from bad… "reference not found"Fix GitLab CI "!reference" and extends resolution errors - an unknown anchor, a missing extends base, or a !r… "!reference" errorsFix GitLab CI "!reference" errors - "unknown !reference value", wrong path depth, or a reference to a key tha… reports not shownFix GitLab CI artifacts:reports problems - JUnit test results or dotenv variables not appearing because the r… "cache:fallback_keys"Fix GitLab CI cache fallback problems - fallback_keys ignored, invalid combination with key:files, or fallbac… "cache:key:files" emptyFix GitLab CI cache:key:files invalid - the files list is empty, has more than two entries, or points at path… "downstream pipeline could not be created"Fix GitLab "downstream pipeline can not be created" in CI - a trigger job failed to start a child or multi-pr… "environment:" errorsFix GitLab CI environment errors - invalid environment:name, a missing on_stop/action job, dynamic environmen… "extends" errorsFix GitLab CI extends errors - "unknown keys in extends", references to a base job that does not exist, and c… "extends" too deepFix GitLab CI "max nesting level" / "too many levels of inheritance" - when extends chains exceed the support… "pull access denied"Fix GitLab CI "pull access denied" / "denied: requested access to the resource is denied" - the job image is… "interruptible" not workingFix GitLab CI interruptible not auto-cancelling superseded pipelines - a non-interruptible job already starte… "at least one visible job"Fix GitLab "jobs config should contain at least one visible job" in CI - every job in .gitlab-ci.yml is hidde… "rules config" invalidFix GitLab CI "jobs:JOB:rules config should be an array of hashes" - a malformed rules block where a rule is… "include" not foundFix GitLab CI include errors - "Local file ... does not exist", "Project not found", or "Included file ... do… "mapping values are not allowed here"Fix GitLab YAML "mapping values are not allowed in this context" in CI - usually an unquoted colon inside a s… "multiple pipelines" warningFix the GitLab CI warning that a job may allow multiple pipelines for a single action - caused by rules that… "job is not defined" in needsFix GitLab "needs config can only reference other jobs ... is not defined" in CI - a needs entry names a job… "needs:project" errorsFix GitLab CI needs:project and multi-project trigger errors - wrong project/ref/job, missing artifact downlo… "parallel:matrix" keysFix GitLab CI parallel:matrix config invalid - when matrix values are not arrays, exceed the job limit, or co… matrix needs namingFix GitLab CI parallel:matrix dependency errors - needs/dependencies on a matrix job failing because each com… "include:project" not foundFix GitLab CI include:project errors - the referenced project or file does not exist, the ref is wrong, or th… "resource_group" stuckFix GitLab CI resource_group jobs that hang in "waiting for resource" - serialized deployments blocked by a s… "rules:changes" mismatchFix GitLab CI rules:changes that match wrong - globs that never hit, every-file matches on the first pipeline… "rules:exists" mismatchFix GitLab CI rules:exists that never matches - globs evaluated from the repo root, case sensitivity, or a pa… "rules:if uses unknown variable"Fix GitLab "rules:if ... unknown variable" / invalid expression in CI - a rules expression references a varia… "could not be loaded" (security template)Fix GitLab "Secret-Detection.gitlab-ci.yml ... could not be fetched" in CI - an included security or template… "manual job cannot be run"Fix GitLab "This job cannot be run" / manual job not playable in CI - the manual job is in a skipped stage, b… "trigger" errorsFix GitLab CI trigger errors - child pipeline config not found, "downstream pipeline can not be created", and… "did not find expected key"Fix GitLab "Invalid configuration format ... did not find expected key" in CI - the .gitlab-ci.yml has a YAML… Child pipeline errorsFix GitLab CI child pipeline failures - "trigger:include" file not found, dynamically generated YAML invalid,… coverage regex no matchFix GitLab CI coverage parsing - the coverage regex never matches job output, so the badge shows "unknown" an… "include" 404Fix GitLab CI include errors - "Local file does not exist", a project/ref 404, or a remote include returning… merge request pipeline not createdFix GitLab merge request pipelines not being created in CI - jobs lack rules for merge_request_event, or work… "parallel" / "matrix"Fix GitLab CI parallel and parallel:matrix errors - out-of-range parallel values, malformed matrix variables,… "rules:changes" no baseFix GitLab CI rules:changes matching everything (or nothing) in a detached MR pipeline - without a merge-requ… Variable expansionFix GitLab CI variable expansion problems - variables that are empty in rules, nested $VAR not expanding, or… "rules:if" variableFix GitLab CI variables that do not expand inside rules:if - wrong quoting, undefined variables, or comparing… pages path not foundFix GitLab Pages publish-path errors - the configured pages publish directory missing, a wrong pages:publish… Pages job errorsFix GitLab Pages deploy failures - a missing public/ artifact, the job not named pages, or the pages:deploy s…

Runners & executors

Registration, tags, Docker executor.

No space left on GitLab CIFix "No Space Left on Device" on GitLab CI: why it happens and the GitLab CI-specific way to give the job the… Registry timeout on GitLab CIFix Dependency Download Timeout / Registry 5xx on GitLab CI: why it happens and the GitLab CI-specific way to… Exit code 137 on GitLab CIFix Exit Code 137 (Out of Memory) on GitLab CI: why it happens and the GitLab CI-specific way to give the job… "lost connection to runner"Fix GitLab CI "system failure" from a runner that lost connection mid-job - the runner crashed, was scaled do… "preparing environment"Fix GitLab "ERROR: Job failed (system failure): preparing environment" - a runner-side failure setting up the… "No active runners online"Fix GitLab "No active runners online" - a registered runner that never goes green because the service is stop… "No active runners"Fix GitLab "No active runners" - a registered runner that never goes online because the service is stopped, m… "no matching tags"Fix GitLab "no runners that match all of the job tags" - when a job requires tags no online runner carries, l… "Preparation failed: Docker"Fix GitLab CI "ERROR: Preparation failed" on the Docker executor - the runner could not create the container,… "stuck ... no runners online"Fix GitLab "This job is stuck because the project doesn't have any runners online" - no active runner is regi… "job is stuck ... no runners"Fix GitLab "This job is stuck because the project does not have any runners" - no runner is enabled, the runn… "Cannot connect to Docker"Fix GitLab CI "Cannot connect to the Docker daemon at unix:///var/run/docker.sock" - missing docker:dind serv… "Could not create cache adapter"Fix GitLab Runner "WARNING: Could not create cache adapter" in CI - the runner's distributed cache config (S3… "DOCKER_AUTH_CONFIG"Fix GitLab CI DOCKER_AUTH_CONFIG problems - job image:/services: pulls from a private registry failing with "… "failed to pull image"Fix GitLab CI image pull failures - "failed to pull image", "manifest unknown", "not found", or "no basic aut… "Failed to remove network for build"Fix GitLab "ERROR: Failed to remove network for build" in CI - the Docker executor could not tear down the pe… Clone/fetch failedFix GitLab CI clone failures in the prepare phase - "fatal: unable to access" / "could not resolve host" when… "maximum execution time"Fix GitLab CI "ERROR: Job failed: execution took longer than ... seconds" - the job, project, or runner timeo… "prepare environment" system failureFix GitLab "ERROR: Job failed (system failure): prepare environment" in CI - the runner could not set up the… "failed to pull image"Fix GitLab CI "ERROR: Job failed: failed to pull image" - the runner could not fetch the job image: wrong tag… "no active runner could process this job"Fix GitLab "This job is stuck because the project does not have any runners online" / "no active runner" in C… "no runners with required tags"Fix GitLab "This job is stuck because you do not have any active runners online or available with any of thes… "no space left on device"Fix GitLab CI "no space left on device" - a runner whose disk filled with old builds, caches, dangling Docker… "pull access denied"Fix GitLab "ERROR: Preparation failed: Error response from daemon: pull access denied" in CI - the runner can… "file too large" artifactsFix GitLab CI Preparation/upload failures when an artifact exceeds the maximum allowed size - trim the artifa… services health checkFix GitLab CI service health check failures - "probably the service is not ready" when a services: container… "Failed to pull image"Fix GitLab "WARNING: Failed to pull image ... locally" with pull policy fallbacks in CI - the runner could no… "DAST/SAST" job failedFix GitLab CI security template jobs (SAST, DAST) that fail - missing stage, no target URL for DAST, unsuppor… "Cannot connect to the Docker daemon at tcp://docker:2375"Fix GitLab "Cannot connect to the Docker daemon at tcp://docker:2375" in CI - the docker:dind service is miss… "401 Unauthorized" (registry)Fix GitLab registry "unauthorized: HTTP status: 401 Unauthorized" on image pull in CI - the registry rejected… "review app" k8s failedFix GitLab CI review app deploys to Kubernetes that fail - image pull errors, missing namespace, RBAC denials… "downstream pipeline" failedFix a GitLab CI trigger job that fails because its downstream (child or multi-project) pipeline failed, with… Runner concurrencyFix GitLab Runner under-utilization or overload - the global concurrent and per-runner limit in config.toml c… K8s executor pod errorsFix GitLab Runner Kubernetes executor job failures - build pods stuck Pending, ImagePullBackOff on the helper… Job timeout on GitLab CIFix Job Timeout / Exceeded Maximum Time on GitLab CI: why it happens and the GitLab CI-specific way to give t…

Jobs & artifacts

Caching, artifacts, dependencies.

"maximum time limit"Fix GitLab CI "execution took longer than ... seconds" - the job, project, or runner timeout was exceeded and… "(system failure): prepare environment"Fix GitLab "ERROR: Job failed (system failure): prepare environment" - a runner-side failure setting up the j… "artifact too large"Fix GitLab CI "too large archive" / "413 Request Entity Too Large" artifact uploads - exceeding the max artif… "too large" / 413Fix GitLab CI artifact upload "too large" and HTTP 413 errors - the artifact exceeds the instance or project… "artifacts not found"Fix GitLab CI missing artifacts between stages - a downstream job finds nothing because artifacts expired or… "CI_JOB_TOKEN" 403Fix GitLab CI_JOB_TOKEN 403/401 errors - cloning another repo, calling the API, or pulling packages fails bec… "exit code 1"Fix GitLab CI "ERROR: Job failed: exit code 1" - a script command returned non-zero. The cleanup line is norm… "could not retrieve the needed artifacts"Fix GitLab "This job could not start because it could not retrieve the needed artifacts" in CI - a needed/dep… "dependencies" not foundFix GitLab CI dependencies pointing at a job that is not in a previous stage - dependencies can only fetch ar… dependencies download failedFix GitLab CI dependencies artifact problems - a job downloads no artifacts, gets the wrong ones, or fails be… "dependencies" errorsFix GitLab CI dependencies errors - listing a job that is not defined, is in a later stage, or produces no ar… "Job failed: exit code 1"Fix GitLab "ERROR: Job failed: exit code 1" in CI - a script command returned a non-zero status, so GitLab ma… "command not found" (127)Fix GitLab CI "exit code 127" / "command not found" - a script step called a binary that is not installed or… "Failed to extract cache"Fix GitLab CI "Failed to extract cache" / cache misses - a volatile cache key, a push-only policy, or runners… "could not read Username"Fix GitLab CI "fatal: could not read Username for https://gitlab.com" - cloning a private repo or submodule w… "fatal: unable to access" with CI_JOB_TOKENFix GitLab "fatal: unable to access ... 403" when cloning another repo with CI_JOB_TOKEN in CI - the job toke… "execution took longer than ... timeout"Fix GitLab "ERROR: Job failed: execution took longer than ... seconds" in CI - the job ran past the job or ru… "exit code 1"Fix GitLab CI "ERROR: Job failed: exit code 1" - a script command returned non-zero. The cleanup line is rout… "exit status 137"Fix GitLab "ERROR: Job failed: exit status 137" in CI - the job process was killed by the OOM killer (or a ha… "needs" not earlier stageFix GitLab CI needs config where the named job exists but is in the same or a later stage - needs can only de… "no space left on device"Fix GitLab CI "no space left on device" - the runner host or build volume filled up with images, caches, or a… "no space left on device"Fix GitLab "write ...: no space left on device" in CI - the runner host or container filled its disk during t… "retry" config errorsFix GitLab CI retry configuration errors - retry:max above the allowed limit, or an unknown retry:when failur… "script" size limitFix GitLab CI errors when inline scripts in .gitlab-ci.yml exceed the allowed size - move large logic into co… "needs" artifacts goneFix GitLab CI jobs that fail because upstream artifacts they need have expired or been erased - the dependenc… "Uploading artifacts ... 401"Fix GitLab CI "Uploading artifacts to coordinator... 401 Unauthorized" - an expired or invalid job token reje… "413 Request Entity Too Large"Fix GitLab "ERROR: Uploading artifacts ... responded with: 413 Request Entity Too Large" in CI - the artifact… "junit" report pathFix GitLab CI artifacts:reports:junit when the report path is not found - the test runner produced no XML, wr… before_script failsFix GitLab CI before_script failures - a non-zero command in before_script aborts the job before script runs,… "no such file or directory" (cache)Fix GitLab cache "WARNING: ... no such file or directory" / "No URL provided, cache will not be downloaded" i… Cache not restoredFix GitLab CI cache misses - dependencies reinstall every run because the cache key changes, the policy is pu… "job token" deniedFix GitLab CI CI_JOB_TOKEN access denied when reaching another project - the source project is not on the tar… "Docker daemon not reachable"Fix GitLab CI "Cannot connect to the Docker daemon" in Docker-in-Docker jobs - a missing docker:dind service… "environment:url" varFix GitLab CI environment:url showing a literal ${VAR} instead of the deployed URL - the variable is undefine… Manual job blocksFix GitLab CI pipelines stuck in "blocked" on a manual job - when a required manual gate is never triggered,… "manual job" blocksFix GitLab CI pipelines stuck blocked on a manual job - a manual job without allow_failure:true halts the pip… "pages" public missingFix GitLab Pages deploys that fail because the pages job produced no public directory - the build wrote outpu… Protected variable emptyFix GitLab CI protected/masked variables that are empty in jobs - a protected variable only exists on protect…
Explore other topics