Supported package managers and functionality

The GitLab package registry supports different functionalities for each package type. This support includes publishing and pulling packages, request forwarding, managing duplicates, and authentication.

Supported package managers

  • Tier: Free, Premium, Ultimate
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated

Not all package manager formats are ready for production use.

The package registry supports the following package manager types:

Package typeStatus
ComposerBeta
Conan 1Experiment
Conan 2Experiment
DebianExperiment
Generic packagesGenerally available
GoExperiment
HelmBeta
MavenGenerally available
npmGenerally available
NuGetGenerally available
PyPIGenerally available
Ruby gemsExperiment

View what each status means.

You can also use the API to administer the package registry.

Publishing packages

  • Tier: Free, Premium, Ultimate
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated

Packages can be published to your project, group, or instance.

Package typeProjectGroupInstance
Maven (with mvn)YesNoNo
Maven (with gradle)YesNoNo
Maven (with sbt)NoNoNo
npmYesNoNo
NuGetYesNoNo
PyPIYesNoNo
Generic packagesYesNoNo
TerraformYesNoNo
ComposerNoYesNo
Conan 1YesNoYes
Conan 2YesNoNo
HelmYesNoNo
DebianYesNoNo
GoYesNoNo
Ruby gemsYesNoNo

Pulling packages

  • Tier: Free, Premium, Ultimate
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated

Packages can be pulled from your project, group, or instance.

Package typeProjectGroupInstance
Maven (with mvn)YesYesYes
Maven (with gradle)YesYesYes
Maven (with sbt)YesYesYes
npmYesYesYes
NuGetYesYesNo
PyPIYesYesNo
Generic packagesYesNoNo
TerraformNoYesNo
ComposerYesYesNo
Conan 1YesNoYes
Conan 2YesNoNo
HelmYesNoNo
DebianYesNoNo
GoYesNoYes
Ruby gemsYesNoNo

Forwarding requests

  • Tier: Premium, Ultimate
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated

Prerequisites:

  • On GitLab.com: You must be the Owner of the group.
  • On GitLab Self-Managed: You must be an administrator.

When a package is not found in your project’s package registry, requests are forwarded to the corresponding public registry of the package manager.

The default forwarding behavior varies by package type and can introduce a dependency confusion vulnerability. The table below shows which package managers support package forwarding.

To reduce the associated security risks:

  • Verify the package is not being actively used.
  • Implement a version control tool, like Git, to track changes to packages.
  • Turn off request forwarding:
    • Instance administrators can disable forwarding in the Admin area. For more information, see Control package forwarding.
    • Group owners can turn off package forwarding in the group settings.

To turn off request forwarding for a group:

  1. On the left sidebar, select Search or go to and find your group. If you’ve turned on the new navigation, this field is on the top bar.
  2. On the left sidebar, select Settings > Packages and registries.
  3. Under Package forwarding, clear either of the following checkboxes:
    • Forward npm package requests
    • Forward PyPI package requests
  4. Select Save changes.
Package typeSupports request forwardingSecurity considerations
Maven (with mvn)Yes (disabled by default)Requires explicit opt-in for security.
Maven (with gradle)Yes (disabled by default)Requires explicit opt-in for security.
Maven (with sbt)Yes (disabled by default)Requires explicit opt-in for security.
npmYesConsider disabling for private packages.
PyPIYesConsider disabling for private packages.
NuGetNoNo
Generic packagesNoNo
TerraformNoNo
ComposerNoNo
Conan 1NoNo
Conan 2NoNo
HelmNoNo
DebianNoNo
GoNoNo
Ruby gemsNoNo

Deleting packages

When package requests are forwarded to a public registry, package deletion can cause a dependency confusion vulnerability.

If a system tries to pull a deleted package, the request forwards to the public registry. If a package with the same name and version is in the public registry, that package is pulled instead. The package pulled from the registry might not be what you expect, and could be malicious.

To reduce the associated security risks, before you delete a package:

To delete packages, you can:

Importing packages from other repositories

You can use GitLab pipelines to import packages from other repositories, such as Maven Central or Artifactory with the package importer tool.

Package typeImporter available?
Maven (with mvn)Yes
Maven (with gradle)Yes
Maven (with sbt)Yes
npmYes
NuGetYes
PyPIYes
Generic packagesNo
TerraformNo
ComposerNo
Conan 1No
Conan 2No
HelmNo
DebianNo
GoNo
Ruby gemsNo

Allow or prevent duplicates

  • Tier: Free, Premium, Ultimate
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated

By default, the GitLab package registry either allows or prevents duplicates based on the default of that specific package manager format.

Package typeDuplicates allowed?
Maven (with mvn)Yes (configurable)
Maven (with gradle)Yes (configurable)
Maven (with sbt)Yes (configurable)
npmNo
NuGetYes
PyPINo
Generic packagesYes (configurable)
TerraformNo
ComposerNo
Conan 1No
Conan 2No
HelmYes
DebianYes
GoNo
Ruby gemsYes

Authenticate with the registry

  • Tier: Free, Premium, Ultimate
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated

Authentication depends on the package manager you’re using. To learn what authentication protocols are supported for a specific package type, see Authentication protocols.

For most package types, the following authentication tokens are valid:

The following table lists which authentication tokens are supported for a given package manager:

Package typeSupported tokens
Maven (with mvn)Personal access, job tokens, deploy (project or group), project access
Maven (with gradle)Personal access, job tokens, deploy (project or group), project access
Maven (with sbt)Personal access, job tokens, deploy (project or group), project access
npmPersonal access, job tokens, deploy (project or group), project access
NuGetPersonal access, job tokens, deploy (project or group), project access
PyPIPersonal access, job tokens, deploy (project or group), project access
Generic packagesPersonal access, job tokens, deploy (project or group), project access
TerraformPersonal access, job tokens, deploy (project or group), project access
ComposerPersonal access, job tokens, deploy (project or group), project access
Conan 1Personal access, job tokens, project access
Conan 2Personal access, job tokens, project access
HelmPersonal access, job tokens, deploy (project or group)
DebianPersonal access, job tokens, deploy (project or group)
GoPersonal access, job tokens, project access
Ruby gemsPersonal access, job tokens, deploy (project or group)

When you configure authentication to the package registry:

  • If the Package registry project setting is turned off, you receive a 403 Forbidden error when you interact with the package registry, even if you have the Owner role.
  • If external authorization is turned on, you can’t access the package registry with a deploy token.
  • If your organization uses two-factor authentication (2FA), you must use a personal access token with the scope set to api.
  • If you are publishing a package by using CI/CD pipelines, you must use a CI/CD job token.

Authentication protocols

  • Tier: Free, Premium, Ultimate
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated

The following authentication protocols are supported:

Package typeSupported auth protocols
Maven (with mvn)Headers, Basic auth
Maven (with gradle)Headers, Basic auth
Maven (with sbt)Basic auth (pulling only)
npmOAuth
NuGetBasic auth
PyPIBasic auth
Generic packagesBasic auth
TerraformToken
ComposerOAuth
Conan 1OAuth, Basic auth
Conan 2OAuth, Basic auth
HelmBasic auth
DebianBasic auth
GoBasic auth
Ruby gemsToken

Supported hash types

  • Tier: Free, Premium, Ultimate
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated

Hash values are used to ensure you are using the correct package. You can view these values in the user interface or with the API.

The package registry supports the following hash types:

Package typeSupported hashes
Maven (with mvn)MD5, SHA1
Maven (with gradle)MD5, SHA1
Maven (with sbt)MD5, SHA1
npmSHA1
NuGetnot applicable
PyPIMD5, SHA256
Generic packagesSHA256
Composernot applicable
Conan 1MD5, SHA1
Conan 2MD5, SHA1
Helmnot applicable
DebianMD5, SHA1, SHA256
GoMD5, SHA1, SHA256
Ruby gemsMD5, SHA1, SHA256 (gemspec only)