Skip to content
Latchkey

GitLab CI "dependencies" Artifact Download Failed - Missing or Empty

dependencies: controls which earlier jobs’ artifacts a job downloads. It breaks when the named job produced no artifacts, when dependencies: [] disables all downloads, or when names do not match.

What this error means

A job that needs build output finds the files absent, downloads the wrong artifacts, or downloads nothing at all - even though an upstream job produced artifacts. The dependencies list is the lever.

Job log
$ ls dist/
ls: cannot access 'dist/': No such file or directory
# upstream 'build' produced dist/, but this job set dependencies: [] (downloads nothing)

Common causes

dependencies: [] disables downloads

Setting dependencies: [] tells the job to download no artifacts at all. Files from earlier stages are then missing by design.

Named dependency produced no artifacts

If the job listed in dependencies did not declare artifacts:paths, there is nothing to fetch, so the consumer gets empty output.

Stage ordering or name mismatch

A dependencies entry must name a job from an earlier stage that ran. A typo, or a job in the same/later stage, means no matching artifacts.

How to fix it

List the producing job explicitly

Name the upstream job in dependencies and ensure it declares the artifacts you need.

.gitlab-ci.yml
build:
  stage: build
  script: make build
  artifacts:
    paths:
      - dist/

deploy:
  stage: deploy
  dependencies: [build]
  script: ./deploy.sh dist/

Prefer needs:artifacts for clarity

In DAG pipelines, needs with artifacts: true both orders and fetches in one place.

.gitlab-ci.yml
deploy:
  needs:
    - job: build
      artifacts: true
  script: ./deploy.sh dist/

How to prevent it

  • Only use dependencies: [] when a job genuinely needs no prior artifacts.
  • Ensure every listed dependency declares the artifacts you consume.
  • Prefer needs:artifacts for explicit ordering and fetching in DAG pipelines.

Frequently asked questions

What causes "dependencies download failed"?
Setting dependencies: [] tells the job to download no artifacts at all. Files from earlier stages are then missing by design.
How do I fix dependencies download failed?
Name the upstream job in dependencies and ensure it declares the artifacts you need.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card