debian-mirror-gitlab/doc/user/packages/index.md

129 lines
7.5 KiB
Markdown
Raw Normal View History

2020-06-23 00:09:42 +05:30
---
stage: Package
group: Package
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
---
2019-12-04 20:38:33 +05:30
# GitLab Package Registry
2020-07-28 23:09:34 +05:30
With the GitLab Package Registry, you can use GitLab as a private or public repository
for a variety of common package managers. You can build and publish
2019-12-04 20:38:33 +05:30
packages, which can be easily consumed as a dependency in downstream projects.
2020-07-28 23:09:34 +05:30
GitLab acts as a repository for the following:
2019-12-04 20:38:33 +05:30
| Software repository | Description | Available in GitLab version |
| ------------------- | ----------- | --------------------------- |
| [Container Registry](container_registry/index.md) | The GitLab Container Registry enables every project in GitLab to have its own space to store [Docker](https://www.docker.com/) images. | 8.8+ |
| [Dependency Proxy](dependency_proxy/index.md) **(PREMIUM)** | The GitLab Dependency Proxy sets up a local proxy for frequently used upstream images/packages. | 11.11+ |
2020-03-13 15:44:24 +05:30
| [Conan Repository](conan_repository/index.md) **(PREMIUM)** | The GitLab Conan Repository enables every project in GitLab to have its own space to store [Conan](https://conan.io/) packages. | 12.6+ |
2019-12-04 20:38:33 +05:30
| [Maven Repository](maven_repository/index.md) **(PREMIUM)** | The GitLab Maven Repository enables every project in GitLab to have its own space to store [Maven](https://maven.apache.org/) packages. | 11.3+ |
| [NPM Registry](npm_registry/index.md) **(PREMIUM)** | The GitLab NPM Registry enables every project in GitLab to have its own space to store [NPM](https://www.npmjs.com/) packages. | 11.7+ |
2020-04-08 14:13:33 +05:30
| [NuGet Repository](nuget_repository/index.md) **(PREMIUM)** | The GitLab NuGet Repository will enable every project in GitLab to have its own space to store [NuGet](https://www.nuget.org/) packages. | 12.8+ |
2020-04-22 19:07:51 +05:30
| [PyPi Repository](pypi_repository/index.md) **(PREMIUM)** | The GitLab PyPi Repository will enable every project in GitLab to have its own space to store [PyPi](https://pypi.org/) packages. | 12.10+ |
2020-06-23 00:09:42 +05:30
| [Go Proxy](go_proxy/index.md) **(PREMIUM)** | The Go proxy for GitLab enables every project in GitLab to be fetched with the [Go proxy protocol](https://proxy.golang.org/). | 13.1+ |
2020-07-28 23:09:34 +05:30
| [Composer Repository](composer_repository/index.md) **(PREMIUM)** | The GitLab Composer Repository will enable every project in GitLab to have its own space to store [Composer](https://getcomposer.org/) packages. | 13.2+ |
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
## View packages
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
You can view packages for your project or group.
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
1. Go to the project or group.
1. Go to **{package}** **Packages & Registries > Package Registry**.
2020-05-24 23:13:21 +05:30
2020-07-28 23:09:34 +05:30
You can search, sort, and filter packages on this page.
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
For information on how to create and upload a package, view the GitLab documentation for your package type.
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
## Use GitLab CI/CD to build packages
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
You can use [GitLab CI/CD](./../../ci/README.md) to build packages.
For Maven and NPM packages, and Composer dependencies, you can
authenticate with GitLab by using the `CI_JOB_TOKEN`.
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
CI/CD templates, which you can use to get started, are in [this repo](https://gitlab.com/gitlab-org/gitlab/-/tree/master/lib/gitlab/ci/templates).
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
Learn more about [using CI/CD to build Maven packages](maven_repository/index.md#creating-maven-packages-with-gitlab-cicd)
and [NPM packages](npm_registry/index.md#publishing-a-package-with-cicd).
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
If you use CI/CD to build a package, extended activity
information is displayed when you view the package details:
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
![Package CI/CD activity](img/package_activity_v12_10.png)
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
You can view which pipeline published the package, as well as the commit and
user who triggered it.
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
## Download a package
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
To download a package:
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
1. Go to **{package}** **Packages & Registries > Package Registry**.
1. Click the name of the package you want to download.
1. In the **Activity** section, click the name of the package you want to download.
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
## Delete a package
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
You cannot edit a package after you publish it in the Package Registry. Instead, you
must delete and recreate it.
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
- You cannot delete packages from the group view. You must delete them from the project view instead.
See [this issue](https://gitlab.com/gitlab-org/gitlab/-/issues/227714) for details.
- You must have suitable [permissions](../permissions.md).
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
You can delete packages by using [the API](../../api/packages.md#delete-a-project-package) or the UI.
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
To delete a package in the UI:
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
1. Go to **{package}** **Packages & Registries > Package Registry**.
1. Find the name of the package you want to delete.
1. Click **Delete**.
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
The package is permanently deleted.
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
## Disable the Package Registry
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
The Package Registry is automatically enabled.
If you are using a self-managed instance of GitLab, your administrator can remove
the menu item, **{package}** **Packages & Registries**, from the GitLab sidebar. For more information,
see the [administration documentation](../../administration/packages/index.md).
You can also remove the Package Registry for your project specifically:
1. In your project, go to **{settings}** **Settings > General**.
1. Expand the **Visibility, project features, permissions** section and disable the
**Packages** feature.
1. Click **Save changes**.
The **{package}** **Packages & Registries > Package Registry** entry is removed from the sidebar.
## Package workflows
Learn how to use the GitLab Package Registry to build your own custom package workflow.
- [Use a project as a package registry](./workflows/project_registry.md) to publish all of your packages to one project.
- Publish multiple different packages from one [monorepo project](./workflows/monorepo.md).
2019-12-04 20:38:33 +05:30
2020-03-13 15:44:24 +05:30
## Suggested contributions
2020-01-01 13:55:28 +05:30
2020-03-13 15:44:24 +05:30
Consider contributing to GitLab. This [development documentation](../../development/packages.md) will
guide you through the process. Or check out how other members of the community
are adding support for [PHP](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/17417) or [Terraform](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18834).
| Format | Use case |
| ------ | ------ |
2020-06-23 00:09:42 +05:30
| [Cargo](https://gitlab.com/gitlab-org/gitlab/-/issues/33060) | Cargo is the Rust package manager. Build, publish and share Rust packages |
| [Chef](https://gitlab.com/gitlab-org/gitlab/-/issues/36889) | Configuration management with Chef using all the benefits of a repository manager. |
| [CocoaPods](https://gitlab.com/gitlab-org/gitlab/-/issues/36890) | Speed up development with Xcode and CocoaPods. |
| [Conda](https://gitlab.com/gitlab-org/gitlab/-/issues/36891) | Secure and private local Conda repositories. |
| [CRAN](https://gitlab.com/gitlab-org/gitlab/-/issues/36892) | Deploy and resolve CRAN packages for the R language. |
| [Debian](https://gitlab.com/gitlab-org/gitlab/-/issues/5835) | Host and provision Debian packages. |
| [Opkg](https://gitlab.com/gitlab-org/gitlab/-/issues/36894) | Optimize your work with OpenWrt using Opkg repositories. |
| [P2](https://gitlab.com/gitlab-org/gitlab/-/issues/36895) | Host all your Eclipse plugins in your own GitLab P2 repository. |
| [Puppet](https://gitlab.com/gitlab-org/gitlab/-/issues/36897) | Configuration management meets repository management with Puppet repositories. |
| [RPM](https://gitlab.com/gitlab-org/gitlab/-/issues/5932) | Distribute RPMs directly from GitLab. |
| [RubyGems](https://gitlab.com/gitlab-org/gitlab/-/issues/803) | Use GitLab to host your own gems. |
| [SBT](https://gitlab.com/gitlab-org/gitlab/-/issues/36898) | Resolve dependencies from and deploy build output to SBT repositories when running SBT builds. |
| [Vagrant](https://gitlab.com/gitlab-org/gitlab/-/issues/36899) | Securely host your Vagrant boxes in local repositories. |