Skip to content
Latchkey

Nexus "status: 404 ... repository not found" on deploy in CI

Nexus returned 404 because the repository name in the URL does not exist on that server. A typo in the repo name, a wrong /repository/ path, or a missing context path all produce this before any auth check matters.

What this error means

The deploy fails with "status code: 404, reason phrase: Not Found" or "repository not found" for the target URL, while the Nexus web UI is reachable.

Nexus
[ERROR] Failed to deploy artifacts: Could not transfer artifact
com.example:app:jar:1.2.0 from/to nexus
(https://nexus.example.com/repository/maven-release/): status code: 404,
reason phrase: repository not found (404)

Common causes

The repository name is misspelled

The URL says maven-release but the repo is maven-releases. Nexus has no repository by that exact name, so it returns 404.

Wrong path or missing /repository/ segment

Nexus 3 serves repositories under /repository/<name>/. Omitting the segment or using an old Nexus 2 /content/repositories/ path yields 404.

How to fix it

Use the exact repository path from Nexus

  1. Open the repository in Nexus and copy its URL from the repositories list.
  2. Confirm the name matches exactly, including plural spelling.
  3. Update distributionManagement (or .npmrc/docker connector) to that URL.
pom.xml
<url>https://nexus.example.com/repository/maven-releases/</url>

Account for a reverse proxy context path

If Nexus sits behind a proxy under a subpath, include it (for example /nexus/repository/...) so the URL resolves.

How to prevent it

  • Copy repository URLs directly from the Nexus UI.
  • Standardize on the Nexus 3 /repository/<name>/ path.
  • Include any reverse-proxy context path in deploy URLs.

Related guides

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