Skip to content
DevOps AI ToolKit
Newsletter
GitLab CI Troubleshooting Toolkit

GitLab CI Troubleshooting Toolkit

Use this GitLab CI troubleshooting toolkit to diagnose failing pipelines, offline or idle runners, invalid .gitlab-ci.yml, missing CI/CD variables, cache and artifact failures, and broken deployment jobs.

Paste your error and get a triage plan.

Paste a log line, CLI error, stack trace, service failure, or config snippet and get a structured troubleshooting plan. Your snippet is carried straight into the AI Incident Response Assistant with GitLab CI context prefilled.

Do not paste secrets, tokens, private keys, passwords, or customer data. Your snippet stays in your browser until you open the assistant.

Top 25 GitLab CI Errors and Failure Modes

The production failures engineers hit most — each links to a full cause → fix → prevention guide.

Pipeline failed

A pipeline shows a red failed status when one or more jobs exit non-zero, so start by opening the first failing job's log to find the root cause.

Runner not picking up jobs

Jobs sit pending because their tags do not match any available runner or the runner is paused, so align job tags with a runner that can accept them.

Stuck job

A job hangs in running or pending state after a runner system failure or lost connection, and usually clears once the runner is restarted or the job is retried.

No runners available

The pipeline warns that this job is stuck because no runners are online to handle it, meaning you must register or unpause a runner with matching tags.

Docker executor failed

The Docker executor cannot connect to the Docker daemon, typically a Docker-in-Docker or socket configuration problem in the runner.

Shell executor failed

A shell executor job fails during setup or script execution because of missing tools, wrong permissions, or an unclean runner host environment.

Permission denied

A job aborts with permission denied when the runner user cannot read, write, or execute a path, often on the cache or working directory.

Cache upload failed

The runner cannot upload the cache archive, commonly due to permission problems or an oversized cache, leaving later jobs to rebuild from scratch.

Artifact upload failed

Artifact upload is rejected with a 413 when the archive exceeds the instance size limit, so scope paths tightly or raise the artifact limit.

Invalid .gitlab-ci.yml

The pipeline refuses to start because the CI config is syntactically or semantically invalid, which CI Lint will pinpoint line by line.

Variable not found

A referenced CI/CD variable is empty or undefined at job runtime because of scope, protection, or environment mismatches in variable hygiene.

Protected variable unavailable

A protected variable resolves to empty because the branch or tag running the job is not protected, so mark the ref protected or unprotect the variable.

Environment deployment failed

A deployment job fails during the prepare environment step, usually from a bad environment URL, missing credentials, or a broken deploy script.

Docker login failed

Authenticating to a container registry returns 401 unauthorized, meaning the token, username, or CI_JOB_TOKEN scope used for docker login is wrong.

Image pull failed

The job fails at preparation because the runner cannot pull the specified image, often from a typo, missing tag, or registry authentication issue.

Job timeout

A job is canceled after exceeding its execution timeout, so profile the slow step and raise the job or project timeout if the work is legitimately long.

Script exited with code 1

A script command returned exit code 1, which is a real command failure inside your job rather than a GitLab or runner problem.

Rules/only/except mismatch

No pipeline is created because your rules, only, or except conditions never evaluate true for the current ref or event.

Needs dependency error

A job with needs fails validation because it references a job that is not in the same pipeline or runs in a later stage.

Include file not found

The pipeline fails because an include path or remote reference cannot be resolved, so verify the file location, project, and ref.

Merge request pipeline not running

A merge request pipeline never launches because workflow rules exclude MR events or a duplicate detached pipeline rule is blocking it.

Scheduled pipeline failed

A scheduled pipeline errors or silently skips because of timezone, protected ref, or workflow rule issues in the cron configuration.

Kubernetes executor failed

A job on the Kubernetes executor fails when the build pod times out waiting to be scheduled, usually from resource limits, taints, or image pull delays.

Service container failed

A service container such as a database or sidecar fails to start or become reachable, breaking integration jobs that depend on it.

Git checkout failed

The runner cannot clone or check out the repository, commonly from access-denied job token permissions or a shallow-clone reference problem.

Validate your config before you redeploy

Catch the structural mistakes that cause outages — 100% in your browser, nothing uploaded.

Best GitLab CI Prompts

Turn symptoms, logs, and config into a structured plan with prompts tuned for GitLab CI.

GitLab Pipeline Failure Triage

Triage a red pipeline fast

Use this prompt

Runner Not Picking Up Jobs

Debug idle or unmatched runners

Use this prompt

Stuck Pending Job Runner Triage

Free jobs stuck in pending

Use this prompt

.gitlab-ci.yml Pre-Merge Review

Lint and validate CI config

Use this prompt

CI Variable Debugging

Fix empty or scoped variables

Use this prompt

Job Timeout Budget Tuning

Tame slow or timing-out jobs

Use this prompt

Cache vs Artifacts Strategy

Fix cache and artifact failures

Use this prompt

Rules and Workflow Debugging

Resolve rules/only/except mismatches

Use this prompt

Download the GitLab CI Troubleshooting Runbook Pack

Checklists for pipelines that will not run, pass, or deploy — syntax, runners, variables, and job failures.

  • .gitlab-ci.yml syntax & rules checks
  • Runner availability & tag matching
  • CI/CD variable & masked-secret fixes
  • Cache & artifact upload triage
  • Job exit-code & deploy debugging
Download the GitLab CI Runbook Pack

All GitLab CI Troubleshooting Guides

Grouped by failure-mode type — each guide covers cause, fix, validation, and prevention.

Authentication & TLS (10)

Networking (4)

Storage (1)

Deployment & Builds (35)

GitHub Actions vs GitLab CI/CD: Which Pipeline Wins? manifest unknown downstream pipeline can not be created shell executor job failed jobs:deploy:environment config should be a hash image pull failed: ImagePullBackOff pull policy ... is not one of the allowed_pull_policies This job is stuck because of a runner system failure toomanyrequests: You have reached your pull rate limit You are not allowed to deploy to production job needs job, but it was not added to the pipeline Pipeline cannot be run $DEPLOY_TOKEN: unbound variable This job is stuck because you don Choosing a GitLab Runner Executor: Shell vs Docker vs Kubernetes DRY GitLab Pipelines With default:, before_script and after_script Architecting Parent-Child Pipelines in GitLab Without Hitting Limits GitLab CI workflow:rules: Stop the Duplicate Detached Pipeline Bug This job is stuck because the project doesn Preparation failed: failed to pull image CI/CD Pipeline Explained for Developers and DevOps Teams What Is Pipeline as Code? A DevOps Practitioner's Guide GitLab Pipeline Debugging Step by Step for DevOps AI-Assisted GitLab Runner Tag and Resource Tuning AI-Generated Rollback Jobs for GitLab CI Deployments Instrumenting GitLab Pipelines With AI-Generated OpenTelemetry Traces Using AI to Debug GitLab CI Cache Misses That Waste Your Runner Minutes Using AI to Speed Up Docker Builds in GitLab CI Using AI to Turn GitLab Pipeline Failures Into Clear Summaries Deployment Approval Gates with GitLab Protected Environments GitLab Releases and Changelog Automation From Your Pipeline Progressive Delivery in GitLab CI: Canary and Blue-Green Deploys Taming GitLab Pipeline Concurrency: Resource Groups and Interruptible Jobs Top 25 GitLab CI/CD Pipeline Mistakes (and How to Avoid Them) AI-Assisted Dynamic Child Pipelines for GitLab Monorepos

Runtime (4)

Performance (1)

API errors (5)

Configuration (8)

Other (22)

Browse the full GitLab CI category

GitLab CI troubleshooting FAQ

Why is my GitLab pipeline failing?
Open the first job that turns red and read its log from the bottom up. Most failures are a real command exiting non-zero (exit code 1), a missing variable, an invalid .gitlab-ci.yml, or a runner that could not pull an image or clone the repo. Fix the earliest failing job first, since later failures are often just downstream effects.
Why aren't my GitLab runners picking up jobs?
The usual cause is a tag mismatch: the job requires tags that no online runner offers, so it stays pending with a stuck warning. Confirm a runner is online and not paused, check that its tags match the job's tags (or enable run untagged jobs), and verify the runner is enabled for that project or group.
How do I fix an invalid .gitlab-ci.yml?
Run it through CI Lint (CI/CD > Editor or the Validator on this site) to get the exact line and reason. Common issues are bad indentation, an undefined stage, a needs reference to a job in a later stage, or an include path that cannot be resolved. Fix the reported node and re-validate before pushing.
Why is my CI variable not available in the job?
Check scope and protection. A protected variable only appears on protected branches and tags, an environment-scoped variable only appears on matching environments, and variable precedence means a lower-priority definition can be overridden. Verify the variable is defined at the right level and that the ref running the job qualifies.
When should I use the GitLab CI Validator?
Use the client-side Validator on this site whenever you edit .gitlab-ci.yml, before opening a merge request, or when a pipeline fails to start with a config error. It checks YAML syntax and structure entirely in your browser so you catch mistakes without burning a pipeline run or exposing your config.
How do I stop a GitLab job from timing out?
First find the slow step in the job log rather than blindly raising the limit. Cache dependencies, split long jobs, and use needs to parallelize. If the work is genuinely long, increase the job's timeout keyword or the project timeout, keeping in mind the runner's own maximum timeout takes precedence when it is lower.