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 (
--grouptakes 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, orGITLAB_TOKENis set. - A saved token wins over
GITLAB_TOKEN. If an old token is saved, runglpkg config removeor save the new one. - Check the token has not expired and has the needed scopes (install:
read_api; publish:api). - An old project
.npmrcwith registry or_authTokenlines 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 sureoriginpoints to the GitLab project, - for self-managed GitLab, log
glabin to your host, - check your token (
glpkg config save <token>orGITLAB_TOKEN).
Tools not found
| Message | Install |
|---|---|
pip not found | Python and pip |
python build not found / twine not found | pip install build twine |
Go not found | Go |
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.