Skip to main content
Version: 0.15 (glpkg CLI)

Troubleshooting

"No install source recorded for: …"​

The package has no source in the flags or in glpkg.lock.json. Say where it comes from:

glpkg install <pkg> --group <group>      # GitLab group
glpkg install <pkg> --external # npmjs / pypi.org / …
glpkg lock set <pkg> --group <group> # record only

For -g, the lock is never read, so the flag is always needed. See Package sources.

"… is not in GitLab group '…' (GitLab answered 302 → … (package forwarding))"​

The group does not host this package, and GitLab tried to forward the request to npmjs. glpkg refuses to install a same-named package from elsewhere. Check:

  • the package name and the group (--group takes the group that contains the publishing project, or a parent group),
  • that the package was actually published: glpkg registry versions <pkg> --group <group>,
  • that your token can read the project (private projects need a token).

If the package really comes from npmjs, use --external.

"Dependencies in a scope routed to GitLab are not hosted by that GitLab group: …"​

A GitLab package depends on a package in the same scope that the group does not host. Publish that dependency to the group, or install it from where it lives and record that (--group / --external).

"No GitLab group known for …"​

glpkg registry versions and delete need a group:

glpkg registry versions @your-org/utils --group your-org
glpkg lock set @your-org/utils --group your-org # or record it once

Authentication errors (401 / 403)​

  • Check that a token is configured: glpkg config check, or GITLAB_TOKEN is set.
  • A saved token wins over GITLAB_TOKEN. If an old token is saved, run glpkg config remove or save the new one.
  • Check the token has not expired and has the needed scopes (install: read_api; publish: api).
  • An old project .npmrc with registry or _authToken lines can override glpkg's settings. glpkg prints a hint when it finds one; remove or rename it and retry.

"Git working directory is not clean"​

glpkg publish needs a clean tree. Commit or stash, or use --force. --dry-run skips the check.

"Failed to detect project"​

glpkg publish uses glab to find the GitLab project of the current repository:

  • install glab, and make sure origin points to the GitLab project,
  • for self-managed GitLab, log glab in to your host,
  • check your token (glpkg config save <token> or GITLAB_TOKEN).

Tools not found​

MessageInstall
pip not foundPython and pip
python build not found / twine not foundpip install build twine
Go not foundGo
dotnet CLI not found.NET SDK

A wrong version was installed​

For npm, glpkg passes your version spec to npm, which resolves it against the registry, including dist-tags such as latest. Pin the version you want: glpkg install @your-org/[email protected] --group your-org. Check what is published with glpkg registry versions.

Old gitlab-* setup still around​

See Migrating from the gitlab-* CLIs.