diff options
Diffstat (limited to 'doc/user/project/protected_tags.md')
-rw-r--r-- | doc/user/project/protected_tags.md | 63 |
1 files changed, 47 insertions, 16 deletions
diff --git a/doc/user/project/protected_tags.md b/doc/user/project/protected_tags.md index 152a55d24b7..3af475afa4f 100644 --- a/doc/user/project/protected_tags.md +++ b/doc/user/project/protected_tags.md @@ -6,7 +6,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w # Protected tags **(FREE)** -Protected tags: +Protected [tags](repository/tags/index.md): - Allow control over who has permission to create tags. - Prevent accidental update or deletion once created. @@ -16,7 +16,7 @@ Each rule allows you to match either: - An individual tag name. - Wildcards to control multiple tags at once. -This feature evolved out of [protected branches](protected_branches.md) +This feature evolved out of [protected branches](protected_branches.md). ## Who can modify a protected tag @@ -27,22 +27,22 @@ By default: ## Configuring protected tags -To protect a tag, you must have at least the Maintainer role. +Prerequisites: -1. Go to the project's **Settings > Repository**. +- You must have at least the Maintainer role for the project. -1. From the **Tag** dropdown list, select the tag you want to protect or type and select **Create wildcard**. In the screenshot below, we chose to protect all tags matching `v*`: - - ![Protected tags page](img/protected_tags_page_v12_3.png) - -1. From the **Allowed to create** dropdown list, select users with permission to create - matching tags, and select **Protect**: - - ![Allowed to create tags dropdown list](img/protected_tags_permissions_dropdown_v12_3.png) - -1. After done, the protected tag displays in the **Protected tags** list: - - ![Protected tags list](img/protected_tags_list_v12_3.png) +1. On the top bar, select **Main menu > Projects** and find your project. +1. On the left sidebar, select **Settings > Repository**. +1. Expand **Protected tags**. +1. To protect a single tag, select **Tag**, then choose your tag from the dropdown list. +1. To protect all tags with names matching a string: + 1. Select **Tag**. + 1. Enter the string to use for tag matching. Wildcards (`*`) are supported. + 1. Select **Create wildcard**. +1. In **Allowed to create** , select either the users or roles that may create protected tags. +1. Select **Protect**. + +The protected tag (or wildcard) displays in the **Protected tags** list. ## Wildcard protected tags @@ -86,6 +86,32 @@ To prevent this problem: Users can still create branches, but not tags, with the protected names. +## Allow deploy keys to create protected tags + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/325415) in GitLab 15.11. + +You can permit the owner of a [deploy key](deploy_keys/index.md) to create protected tags. +The deploy key works, even if the user isn't a member of the related project. However, the owner of the deploy +key must have at least read access to the project. + +Prerequisites: + +- The deploy key must be enabled for your project. A project deploy key is enabled by default when + it is created. However, a public deploy key must be + [granted](deploy_keys/index.md#grant-project-access-to-a-public-deploy-key) access to the + project. +- The deploy key must have [write access](deploy_keys/index.md#permissions) to your project + repository. + +To allow a deploy key to create a protected tag: + +1. On the top bar, select **Main menu > Projects** and find your project. +1. On the left sidebar, select **Settings > Repository**. +1. Expand **Protected tags**. +1. From the **Tag** dropdown list, select the tag you want to protect. +1. From the **Allowed to create** list, select the deploy key. +1. Select **Protect**. + ## Delete a protected tag You can manually delete protected tags with the GitLab API, or the @@ -106,6 +132,11 @@ Protected tags can only be deleted by using GitLab either from the UI or API. These protections prevent you from accidentally deleting a tag through local Git commands or third-party Git clients. +## Related topics + +- [Protected Tags API](../../api/protected_tags.md) +- [Tags API](../../api/tags.md) + <!-- ## Troubleshooting Include any troubleshooting steps that you can foresee. If you know beforehand what issues |