Protected Branches and Tags

Configuring Protected Tags in GitLab

< >

3. Configuring Protected Tags in GitLab

3.1 Setting Up Protected Tags

  1. Navigate to Project Settings:
    • Go to your project in GitLab.
    • Click on Settings > Repository.
  2. Add a Protected Tag:
    • Scroll down to the Protected tags section.
    • 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 Protect to apply the settings.

protected_tag

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 Tag field, you can use wildcards:
  • Type v* to protect all tags starting with v Type *-release to protect all tags ending with -release

3.3 Removing Tag Protection

  • In the Protected Tags section, find the tag you want to unprotect
  • Click the Unprotect button next to it