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

181 lines
7.9 KiB
Markdown
Raw Normal View History

2020-10-24 23:57:45 +05:30
---
stage: Package
group: Package
2021-02-22 17:27:13 +05:30
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/#assignments
2020-10-24 23:57:45 +05:30
---
2021-04-17 20:07:23 +05:30
# Package Registry **(FREE)**
2020-10-24 23:57:45 +05:30
2021-12-11 22:18:48 +05:30
> [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/221259) from GitLab Premium to GitLab Free in 13.3.
2020-10-24 23:57:45 +05:30
2021-12-11 22:18:48 +05:30
With the GitLab Package Registry, you can use GitLab as a private or public registry for a variety
of [supported package managers](#supported-package-managers).
You can publish and share packages, which can be consumed as a dependency in downstream projects.
2020-10-24 23:57:45 +05:30
## View packages
You can view packages for your project or group.
1. Go to the project or group.
2021-01-03 14:25:43 +05:30
1. Go to **Packages & Registries > Package Registry**.
2020-10-24 23:57:45 +05:30
2021-04-29 21:17:54 +05:30
You can search, sort, and filter packages on this page. You can share your search results by copying
and pasting the URL from your browser.
2020-10-24 23:57:45 +05:30
2021-04-17 20:07:23 +05:30
You can also find helpful code snippets for configuring your package manager or installing a given package.
2021-03-11 19:13:27 +05:30
When you view packages in a group:
- All projects published to the group and its projects are displayed.
- Only the projects you can access are displayed.
- If a project is private, or you are not a member of the project, it is not displayed.
2020-10-24 23:57:45 +05:30
For information on how to create and upload a package, view the GitLab documentation for your package type.
## Use GitLab CI/CD to build packages
2021-09-30 23:02:18 +05:30
You can use [GitLab CI/CD](../../../ci/index.md) to build packages.
For Maven, NuGet, npm, Conan, Helm, and PyPI packages, and Composer dependencies, you can
2020-10-24 23:57:45 +05:30
authenticate with GitLab by using the `CI_JOB_TOKEN`.
2021-03-11 19:13:27 +05:30
CI/CD templates, which you can use to get started, are in [this repository](https://gitlab.com/gitlab-org/gitlab/-/tree/master/lib/gitlab/ci/templates).
2020-10-24 23:57:45 +05:30
2021-09-04 01:27:46 +05:30
Learn more about using the GitLab Package Registry with CI/CD:
2020-10-24 23:57:45 +05:30
2021-09-04 01:27:46 +05:30
- [Composer](../composer_repository/index.md#publish-a-composer-package-by-using-cicd)
- [Conan](../conan_repository/index.md#publish-a-conan-package-by-using-cicd)
- [Generic](../generic_packages/index.md#publish-a-generic-package-by-using-cicd)
- [Maven](../maven_repository/index.md#create-maven-packages-with-gitlab-cicd)
- [npm](../npm_registry/index.md#publish-an-npm-package-by-using-cicd)
- [NuGet](../nuget_repository/index.md#publish-a-nuget-package-by-using-cicd)
2021-12-11 22:18:48 +05:30
- [PyPI](../pypi_repository/index.md#authenticate-with-a-ci-job-token)
- [RubyGems](../rubygems_registry/index.md#authenticate-with-a-ci-job-token)
2021-01-29 00:20:46 +05:30
If you use CI/CD to build a package, extended activity information is displayed
when you view the package details:
2020-10-24 23:57:45 +05:30
![Package CI/CD activity](img/package_activity_v12_10.png)
2021-02-22 17:27:13 +05:30
You can view which pipeline published the package, and the commit and user who triggered it. However, the history is limited to five updates of a given package.
2020-10-24 23:57:45 +05:30
## Download a package
To download a package:
2021-01-03 14:25:43 +05:30
1. Go to **Packages & Registries > Package Registry**.
2021-01-29 00:20:46 +05:30
1. Select the name of the package you want to download.
1. In the **Activity** section, select the name of the package you want to download.
2020-10-24 23:57:45 +05:30
## Delete a package
You cannot edit a package after you publish it in the Package Registry. Instead, you
must delete and recreate it.
2020-11-24 15:15:51 +05:30
To delete a package, you must have suitable [permissions](../../permissions.md).
2020-10-24 23:57:45 +05:30
You can delete packages by using [the API](../../../api/packages.md#delete-a-project-package) or the UI.
2020-11-24 15:15:51 +05:30
To delete a package in the UI, from your group or project:
2020-10-24 23:57:45 +05:30
2021-01-03 14:25:43 +05:30
1. Go to **Packages & Registries > Package Registry**.
2020-10-24 23:57:45 +05:30
1. Find the name of the package you want to delete.
1. Click **Delete**.
The package is permanently deleted.
2021-09-04 01:27:46 +05:30
## Delete files associated with a package
To delete package files, you must have suitable [permissions](../../permissions.md).
You can delete packages by using [the API](../../../api/packages.md#delete-a-package-file) or the UI.
To delete package files in the UI, from your group or project:
1. Go to **Packages & Registries > Package Registry**.
1. Find the name of the package you want to delete.
1. Select the package to view additional details.
2021-09-30 23:02:18 +05:30
1. Find the name of the file you would like to delete.
2021-09-04 01:27:46 +05:30
1. Expand the ellipsis and select **Delete file**.
The package files are permanently deleted.
2020-10-24 23:57:45 +05:30
## Disable the Package Registry
The Package Registry is automatically enabled.
If you are using a self-managed instance of GitLab, your administrator can remove
2021-01-03 14:25:43 +05:30
the menu item, **Packages & Registries**, from the GitLab sidebar. For more information,
2020-10-24 23:57:45 +05:30
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 > General**.
1. Expand the **Visibility, project features, permissions** section and disable the
**Packages** feature.
1. Click **Save changes**.
2021-01-03 14:25:43 +05:30
The **Packages & Registries > Package Registry** entry is removed from the sidebar.
2020-10-24 23:57:45 +05:30
## Package workflows
2021-09-04 01:27:46 +05:30
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.
2020-10-24 23:57:45 +05:30
2021-09-04 01:27:46 +05:30
- Publish multiple different packages from one [monorepo project](../workflows/working_with_monorepos.md).
2021-12-11 22:18:48 +05:30
## Supported package managers
WARNING:
Not all package manager formats are ready for production use. To view each format's status, see the
table's **Status** column.
The Package Registry supports the following formats:
| Package type | GitLab version | Status |
| ------------ | -------------- |------- |
| [Maven](../maven_repository/index.md) | 11.3+ | GA |
| [npm](../npm_registry/index.md) | 11.7+ | GA |
| [NuGet](../nuget_repository/index.md) | 12.8+ | GA |
| [PyPI](../pypi_repository/index.md) | 12.10+ | GA |
| [Generic packages](../generic_packages/index.md) | 13.5+ | GA |
| [Composer](../composer_repository/index.md) | 13.2+ | [Beta](https://gitlab.com/groups/gitlab-org/-/epics/6817) |
| [Conan](../conan_repository/index.md) | 12.6+ | [Beta](https://gitlab.com/groups/gitlab-org/-/epics/6816) |
| [Helm](../helm_repository/index.md) | 14.1+ | [Beta](https://gitlab.com/groups/gitlab-org/-/epics/6366) |
| [Debian](../debian_repository/index.md) | 14.2+ | [Alpha](https://gitlab.com/groups/gitlab-org/-/epics/6057) |
| [Go](../go_proxy/index.md) | 13.1+ | [Alpha](https://gitlab.com/groups/gitlab-org/-/epics/3043) |
| [Ruby gems](../rubygems_registry/index.md) | 13.10+ | [Alpha](https://gitlab.com/groups/gitlab-org/-/epics/3200) |
[Status](https://about.gitlab.com/handbook/product/gitlab-the-product/#generally-available-ga):
- Alpha: behind a feature flag and not officially supported.
- Beta: several known issues that may prevent expected use.
- GA (Generally Available): ready for production use at any scale.
You can also use the [API](../../../api/packages.md) to administer the Package Registry.
## Accepting contributions
This table lists unsupported package manager formats that we are accepting contributions for.
Consider contributing to GitLab. This [development documentation](../../../development/packages.md)
guides you through the process.
<!-- vale gitlab.Spelling = NO -->
| Format | Status |
| ------ | ------ |
| Chef | [#36889](https://gitlab.com/gitlab-org/gitlab/-/issues/36889) |
| CocoaPods | [#36890](https://gitlab.com/gitlab-org/gitlab/-/issues/36890) |
| Conda | [#36891](https://gitlab.com/gitlab-org/gitlab/-/issues/36891) |
| CRAN | [#36892](https://gitlab.com/gitlab-org/gitlab/-/issues/36892) |
| Opkg | [#36894](https://gitlab.com/gitlab-org/gitlab/-/issues/36894) |
| P2 | [#36895](https://gitlab.com/gitlab-org/gitlab/-/issues/36895) |
| Puppet | [#36897](https://gitlab.com/gitlab-org/gitlab/-/issues/36897) |
| RPM | [#5932](https://gitlab.com/groups/gitlab-org/-/epics/5128) |
| SBT | [#36898](https://gitlab.com/gitlab-org/gitlab/-/issues/36898) |
| Swift | [#12233](https://gitlab.com/gitlab-org/gitlab/-/issues/12233) |
| Vagrant | [#36899](https://gitlab.com/gitlab-org/gitlab/-/issues/36899) |
<!-- vale gitlab.Spelling = YES -->