Self-managed GitLab
gitlab.com is the primary target of glpkg. A self-managed GitLab instance works for the main npm install and publish flows, but not yet for every command. This page lists exactly what is covered in glpkg 0.15.
Setting the host
glpkg uses one GitLab host at a time. Set it with either:
glpkg config defaults host gitlab.example.com # saved in ~/.config/glpkg/defaults.json
export IST_GITLAB_HOST=gitlab.example.com # per shell or CI job
Use the host name only, without https://. glpkg repo commands also accept --host.
What uses the configured host
| Command | Host taken from |
|---|---|
glpkg install (npm) | IST_GITLAB_HOST, then config defaults host, then gitlab.com |
glpkg lock set | IST_GITLAB_HOST, then config defaults host, then gitlab.com |
glpkg publish (npm, PyPI, NuGet, generic) upload | IST_GITLAB_HOST, then config defaults host, then gitlab.com |
glpkg repo create / clone / rename | --host, then config defaults host, then gitlab.com |
glpkg registry versions / delete | IST_GITLAB_HOST, then gitlab.com |
Known gaps in 0.15
| Area | Behavior on a self-managed instance |
|---|---|
glpkg install --pypi, --go, --nuget | Registry URLs point at gitlab.com |
glpkg registry info / list / search | Always query gitlab.com |
glpkg registry versions / delete | Ignore config defaults host; set IST_GITLAB_HOST |
glpkg publish (npm) | Group lookup uses IST_GITLAB_HOST but not config defaults host; set IST_GITLAB_HOST |
glpkg publish output | The printed "Package URL" / "Module URL" shows gitlab.com |
glpkg migrate-lock | Writes gitlab.com as the registry host in distkit.manifest.json |
Recommendation: on a self-managed instance, set both config defaults host and
IST_GITLAB_HOST, and use npm packages. glab must also be configured for your instance
(glab auth login --hostname gitlab.example.com) because glpkg publish uses it to detect
the project.