GitLab Package Registry
GitLabパッケージを利用することで、GitLabを様々なパッケージマネージャのプライベートリポジトリとして利用できます。ユーザーはパッケージをビルドして公開でき、下流のプロジェクトで依存関係として簡単に利用できます。
The Packages feature allows GitLab to act as a repository for the following:
Software repository | 説明 | Available in GitLab version |
---|---|---|
コンテナレジストリ | コンテナレジストリを利用することで、すべてのプロジェクトがDockerイメージを保存するためのスペースを持つことができます。 | 8.8+ |
依存関係プロキシ | 依存関係プロキシは、頻繁に利用される上流のイメージ/パッケージのローカルプロキシを設定します。 | 11.11+ |
Conanリポジトリ | Conanリポジトリを利用することで、すべてのプロジェクトがConanパッケージを保存するためのスペースを持つことができます。 | 12.6+ |
Mavenリポジトリ | Mavenリポジトリは、すべてのプロジェクトがMavenパッケージを保存するためのスペースを持つことができます。 | 11.3+ |
NPMレジストリ | NPMレジストリを使用すると、すべてのプロジェクトが NPM パッケージを保存するためのスペースを持つことができます。 | 11.7+ |
NuGet Repository | The GitLab NuGet Repository will enable every project in GitLab to have its own space to store NuGet packages. | 12.8+ |
PyPi Repository | The GitLab PyPi Repository will enable every project in GitLab to have its own space to store PyPi packages. | 12.10+ |
Go Proxy | The Go proxy for GitLab enables every project in GitLab to be fetched with the Go proxy protocol. | 13.1+ |
Composer Repository | The GitLab Composer Repository will enable every project in GitLab to have its own space to store Composer packages. | 13.2+ |
Enable the Package Registry for your project
If you cannot find the Packages & Registries > Package Registry entry under your project’s sidebar, ensure that:
- The GitLab Package Registry has been enabled by your administrator (following this documentation); and
- The Package Registry has been enabled for your project.
Once an administrator has enabled the GitLab Package Registry for your GitLab instance, to enable Package Registry for your project:
- Go to your project’s Settings > General page.
- Expand the Visibility, project features, permissions section and enable the Packages feature on your project.
- Press Save changes for the changes to take effect. You should now be able to see the Packages & Registries > Package Registry link in the sidebar.
View Packages for your project
Navigating to your project’s Packages & Registries > Package Registry will show a list of all packages that have been added to your project.
On this page, you can:
- View all the packages that have been uploaded to the project.
- Sort the packages list by created date, version or name.
- Filter the list by package name.
- Change tabs to display packages of a certain type.
- Remove a package (if you have suitable permissions).
- Navigate to specific package detail page.
View Packages for your group
You can view all packages belonging to a group by navigating to Packages & Registries > Package Registry from the group sidebar.
On this page, you can:
- View all the packages that have been uploaded to each of the groups projects.
- Sort the packages list by created date, version, name or project.
- Filter the list by package name.
- Change tabs to display packages of a certain type.
- Navigate to specific package detail page.
View additional package information
Additional package information can be viewed by browsing to the package details page from the either the project or group list.
On this page you can:
- See the extended package information, including metadata. This is unique to each package type and will display different information for different types.
- View quick installation and registry setup instructions. These are a shortcut for users who have already set up the Package Registry and just want quick installation instructions.
- View the package activity, including when and how a package was published.
- View and download the contents of the package. Outside of installing a package via a manager, you can also download the files individually.
- Delete the package (if you have suitable permissions).
Build packages via GitLab CI/CD
Some of the supported packages can be built via GitLab CI/CD
using the CI_JOB_TOKEN
. If a package is built this way, then extended activity
information is displayed on the package details page:
You can view which pipeline published the package, as well as the commit and user who triggered it. To see if a package type supports being built via CI/CD, check the specific documentation for your package type.
Suggested contributions
Consider contributing to GitLab. This development documentation will guide you through the process. Or check out how other members of the community are adding support for PHP or Terraform.
フォーマット | Use case |
---|---|
Cargo | Cargo is the Rust package manager. Build, publish and share Rust packages |
Chef | Configuration management with Chef using all the benefits of a repository manager. |
CocoaPods | Speed up development with Xcode and CocoaPods. |
Conda | Secure and private local Conda repositories. |
CRAN | Deploy and resolve CRAN packages for the R language. |
Debian | Host and provision Debian packages. |
Opkg | Optimize your work with OpenWrt using Opkg repositories. |
P2 | Host all your Eclipse plugins in your own GitLab P2 repository. |
Puppet | Configuration management meets repository management with Puppet repositories. |
RPM | Distribute RPMs directly from GitLab. |
RubyGems | Use GitLab to host your own gems. |
SBT | Resolve dependencies from and deploy build output to SBT repositories when running SBT builds. |
Vagrant | Securely host your Vagrant boxes in local repositories. |
Package workflows
Learning how to use the GitLab Package Registry will help you build your own custom package workflow.
- Use a project as a package registry to publish all of your packages to one project.
- Working with a monorepo: Learn how to publish multiple different packages from one monorepo project.