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.
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 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_inpassed) - Producing job failed or was skipped by rules
- Retrying a late stage of an old pipeline
- Job names in
dependenciesdo not match - Artifacts deleted manually or by cleanup
⚡ Quick fix
- Re-run the producing job to regenerate artifacts
- Increase
artifacts:expire_inor usekeep latest artifacts - Fix
dependencies/needsjob names
Detailed fix by platform
GitLab CI
- Settings → CI/CD → Artifacts → Keep artifacts from most recent successful jobs
Code examples
Explicit dependency
test:
stage: test
needs:
- job: build
artifacts: true
script: ./run-tests.sh dist/How to diagnose
- Producer — Did the build job succeed?
- Age — Past expire_in?
- 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:
Similar errors
- .gitlab-ci.yml invalid GitLab CI: Found errors in your .gitlab-ci.yml: jobs:build config contains unknown keys: scripts
- Cannot connect to the Docker daemon (GitLab) GitLab CI: Cannot connect to the Docker daemon at tcp://docker:2375. Is the docker daemon running?
- 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`
Most viewed in CI/CD
- The process '/usr/bin/git' failed with exit code 128 GitHub Actions: Error: The process '/usr/bin/git' failed with exit code 128
- This job is stuck because you don't have any active runners GitLab CI: This job is stuck because you don't have any active runners online or available with any of these tags assigned to them
- Resource not accessible by integration GitHub Actions: Error: Resource not accessible by integration (403)
Other ways to find it
Where this error sits
Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):
🧠 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.
Report a correction or suggest an improvement
Last updated 25 Oct 2026