Skip to main content
Version: 0.15 (glpkg CLI)

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​

CommandHost taken from
glpkg install (npm)IST_GITLAB_HOST, then config defaults host, then gitlab.com
glpkg lock setIST_GITLAB_HOST, then config defaults host, then gitlab.com
glpkg publish (npm, PyPI, NuGet, generic) uploadIST_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 / deleteIST_GITLAB_HOST, then gitlab.com

Known gaps in 0.15​

AreaBehavior on a self-managed instance
glpkg install --pypi, --go, --nugetRegistry URLs point at gitlab.com
glpkg registry info / list / searchAlways query gitlab.com
glpkg registry versions / deleteIgnore 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 outputThe printed "Package URL" / "Module URL" shows gitlab.com
glpkg migrate-lockWrites 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.