Skip to content
Latchkey

Artifactory "404 repository not found" in CI

Artifactory returned 404 because the repository key in the URL does not resolve to a repository of that package type. Authentication may be fine; the path is wrong.

What this error means

A client reports 404 for the Artifactory URL, for example "404 Not Found - GET https://<host>/artifactory/api/npm/wrong-repo/pkg" or a Maven resolve that says the repository was not found.

Artifactory
npm error code E404
npm error 404 Not Found - GET https://mycompany.jfrog.io/artifactory/api/npm/npm-vitual/react
npm error 404 'react@^18.0.0' is not in this registry.

Common causes

A typo or wrong repository key in the URL

The registry URL names a repo key that does not exist (a misspelling like npm-vitual), so Artifactory has nothing to serve.

Wrong package-type endpoint

Using the npm API path against a Maven repo (or vice versa) makes Artifactory treat the repo as absent for that client.

How to fix it

Copy the exact repo URL from Set Me Up

  1. Open the repository in Artifactory and use "Set Me Up".
  2. Copy the exact registry URL, including the correct repo key and package-type path.
  3. Update the CI config and re-run.
.npmrc
registry=https://mycompany.jfrog.io/artifactory/api/npm/npm-virtual/

Confirm the repository exists via the API

List configured repositories to verify the key and type before pointing CI at it.

Terminal
curl -u "$USER:$TOKEN" https://mycompany.jfrog.io/artifactory/api/repositories

How to prevent it

  • Always copy repo URLs from "Set Me Up" rather than typing them.
  • Match the package-type path (api/npm, Maven layout) to the repo type.
  • Keep repository keys in one shared config to avoid per-job typos.

Related guides

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