3. Configuring Protected Tags in GitLab
3.1 Setting Up Protected Tags
- Navigate to Project Settings:
- Go to your project in GitLab.
- Click on
Settings>Repository.
- Add a Protected Tag:
- Scroll down to the
Protected tagssection. - Select the tag you want to protect (e.g.,
v1.0). - Configure the protection settings:
- Allowed to Create: Specify roles or users who can create this tag.
- Click
Protectto apply the settings.
- Scroll down to the
Example Configuration
Tag: v1.0
- Allowed to Create: Maintainers
3.2 Wildcard Tag Protection
In the same way we have mentioned to using Wildcard for Protected branches, we can create Wildcard patterns for branches.
- In the
Tagfield, you can use wildcards: - Type
v*to protect all tags starting withvType*-releaseto protect all tags ending with-release
3.3 Removing Tag Protection
- In the
Protected Tagssection, find the tag you want to unprotect - Click the
Unprotectbutton next to it