GitLab: a job could not retrieve the needed artifacts
A job fails to start with This job could not start because it could not retrieve the needed artifacts. when GitLab cannot fetch the artifacts the job expects. With the names of the jobs it reads ...artifacts: build, test (GitLab docs: job artifacts troubleshooting, checked November 19, 2026). The job gets missing_dependency_failure as its failure reason.
Three causes
- The dependencies are not found. By default a job in a later stage fetches the artifacts of every job in the earlier stages, so all of those are its dependencies. With
dependencies, only the jobs it lists are. - The artifacts have expired. Set a longer time with
artifacts:expire_in. - No permission to reach the resources.
To see the failed job and its log in the IDE: Pipelines and Jobs Inbox for GitLab CI, a plugin for JetBrains IDEs, shows next to a failed job its status, how long it ran and the message GitLab gives for the failure, and opens the job's log in a console viewer at the bottom of the IDE.
For a job with needs:project
rspec:
needs:
- project: my-group/my-project
job: dependency-job
ref: master
artifacts: true
- The group of
my-group/my-projecthas a Premium subscription. - The user who triggers the pipeline has at least the Reporter role in that project.
- The
project,jobandrefcombination exists and gives the dependency you want, and any variables in it have the right values. - With
CI_JOB_TOKEN, add the project that runs the job to the allowlist of the project that has the artifacts. The allowlist does not give the triggering user access; they need the role already.
For a job with needs:pipeline:job
rspec:
needs:
- pipeline: $UPSTREAM_PIPELINE_ID
job: dependency-job
artifacts: true
- The
$UPSTREAM_PIPELINE_IDvariable is available in the parent and child pipelines of the hierarchy. - The
pipelineandjobcombination exists and points at an existing pipeline. dependency-jobhas run and finished successfully.
The list of failure reasons a job can have is on job dropped as stuck or over its timeout.
GitLab pipelines in IntelliJ IDEA
Pipelines and Jobs Inbox for GitLab CI, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, shows a failed job with its status, how long it ran and the message GitLab gives for the failure, and opens the job's log in a console viewer at the bottom of the IDE, searchable, following a running job as it writes. You can retry the job from the IDE (Pro). Reading is free; retrying, cancelling and running are Pro (US$1.50 a month, with a 30-day trial).
Get it on JetBrains Marketplace
GITLAB is a trademark of GitLab Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by GitLab Inc. or JetBrains.
More: GitLab "No files to upload" · GitLab job dropped as stuck or over its timeout · GitLab "Failed to pull image" (job token allowlist) · GitLab pipeline or job refused (400, 403, 409, 429)