Skip to content
Latchkey

Leiningen "Could not find artifact" in CI

Leiningen asked a Maven repository for a dependency and got nothing back. The coordinates are wrong, the repo is missing, or the download failed.

What this error means

lein deps or a build fails with Could not find artifact group:artifact:jar:version or Could not transfer artifact, listing the repos tried. Valid coordinates that fail to transfer are usually transient.

lein
Could not transfer artifact org.example:widget:jar:1.4.0 from/to clojars
(https://repo.clojars.org/): connect timed out
Could not find artifact org.example:widget:jar:1.4.0

Common causes

Wrong coordinates

A typo in the group, artifact, or version means no such artifact exists in any configured repository.

Repository not configured

The artifact lives in a repo (a private Maven or a non-default one) not listed in project.clj.

Transient transfer failure

The coordinates are valid but the download to Clojars/Maven Central timed out; a re-run succeeds.

How to fix it

Verify coordinates and repos

Confirm the exact coordinates and add any non-default repository.

project.clj
:dependencies [[org.example/widget "1.4.0"]]
:repositories [["internal" {:url "https://maven.example.com"}]]

Add credentials for private repos

  1. Store repo credentials in CI secrets, not project.clj.
  2. Reference them via :username/:password env lookups.
  3. Confirm the runner can reach the repo host.

Re-run on transient transfer errors

A connect-timeout on valid coordinates usually clears on retry. On Latchkey managed runners, self-healing auto-retries transient artifact transfer failures.

How to prevent it

  • Pin exact dependency versions.
  • Configure all needed repositories.
  • Cache the local Maven (~/.m2) directory.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →