Job depends on artifacts that have expired CI/CD Origin: Build & delivery Last updated 25 Oct 2026

GitLab CI: This job could not start because it could not retrieve the needed artifacts (dependencies: build).

A job needs artifacts from an earlier job, but that job failed, was skipped or its artifacts have expired or been deleted.

Exact message you may see This job could not start because it could not retrieve the needed artifactscould not retrieve the needed artifactsdependency_scanning artifacts expiredThe pipeline job depends on artifacts that have expiredJob artifacts were removed
Seen on: GitLab CI

Meaning

With dependencies: or needs: [artifacts: true], the earlier job must have succeeded and still hold its artifacts. If expire_in has passed, or you retried a later job in an old pipeline, they are gone. Re-run the producing job, extend expire_in, or keep the artifacts of the latest successful pipeline.

Common causes

  • Artifacts expired (expire_in passed)
  • Producing job failed or was skipped by rules
  • Retrying a late stage of an old pipeline
  • Job names in dependencies do not match
  • Artifacts deleted manually or by cleanup

⚡ Quick fix

  1. Re-run the producing job to regenerate artifacts
  2. Increase artifacts:expire_in or use keep latest artifacts
  3. Fix dependencies/needs job names

Detailed fix by platform

GitLab CI

  1. Settings → CI/CD → Artifacts → Keep artifacts from most recent successful jobs

Code examples

Explicit dependency

yaml
test:
  stage: test
  needs:
    - job: build
      artifacts: true
  script: ./run-tests.sh dist/

How to diagnose

  1. Producer — Did the build job succeed?
  2. Age — Past expire_in?
  3. Names — Matching job names?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):

.gitlab-ci.yml invalid — GitLab CI: Found errors in your .gitlab-ci.yml: jobs:build config contains unknown keys: scripts (CI/CD).gitlab-ci.yml invalidCannot connect to the Docker daemon (GitLab) — GitLab CI: Cannot connect to the Docker daemon at tcp://docker:2375. Is the docker daemon running? (CI/CD)Cannot connect to the…deprecated version of actions/upload-artifact — GitHub Actions: Error: This request has been automatically failed because it uses a deprecated version of `actions/upload-artifact: v3` (CI/CD)deprecated version of…ERROR: Job failed: exit code 1 — GitLab CI: ERROR: Job failed: exit code 1 (CI/CD)ERROR: Job failed: ex…execution took longer than 1h0m0s — GitLab CI: ERROR: Job failed: execution took longer than 1h0m0s seconds (CI/CD)execution took longer…failed to pull image (GitLab) — GitLab CI: ERROR: Job failed: failed to pull image "registry.example.com/app:latest" with specified policies [always]: access forbidden (CI/CD)failed to pull image …Pipeline filtered out by workflow:rules — GitLab CI: No pipeline created — pipeline filtered out by workflow:rules / "The rules configuration prevented any jobs from being added to the pipeline" (CI/CD)Pipeline filtered out…Unable to download artifact — GitHub Actions: Error: Unable to download artifact(s): Artifact not found for name: build (CI/CD)Unable to download ar…Job depen…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.