Skip to content
Latchkey

Artifactory "repository is not configured for" package type in CI

Artifactory rejected the request because the target repository is a different package type than the client expects. An npm request hit a Maven repo, or similar.

What this error means

A package-manager request fails with "The repository 'X' is not configured for npm packages" (or maven, pypi, docker). The repo exists but has the wrong package type.

jf
[Error] server response: 400 Bad Request
{
  "errors": [ { "status": 400, "message": "The repository 'libs-release-local' is not configured for npm packages." } ]
}

Common causes

Requesting the wrong package-type repo

Each Artifactory repo has a single package type. Pointing npm at a Maven repo (or pip at a Docker repo) is rejected as not configured.

A copy-pasted repo key from another ecosystem

A registry URL reused from another package manager targets a repo built for a different type.

How to fix it

Point the client at the matching package-type repo

  1. Find the repo whose package type matches your client (npm, pypi, maven, docker).
  2. Update the registry/index/repo path to that key.
  3. Re-run the operation against the correct type.
Terminal
# npm should target an npm repo, not a maven one
jf npm-config --repo-resolve npm-virtual --repo-deploy npm-local

List repositories with their types

Confirm each repo key and its package type before wiring it into CI.

Terminal
jf rt curl -XGET "/api/repositories" | jq '.[] | {key, type, packageType}'

How to prevent it

  • Match each package manager to a repo of the same package type.
  • Name repos with the package type so misuse is obvious.
  • Verify repo types when adding a new ecosystem to CI.

Related guides

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