Updated on 2025-07-24 GMT+08:00

Configuring Protected Tag Rules

Constraints

Table 1 Constraints on configuring protected tag rules

Item

Description

Permission constraint

To configure protected tag rules for a repository, you need to have the necessary permissions. For details, see Configuring Repo-Level Permissions.

Function constraint

Only one tag rule can be created for a tag. Otherwise, an error message is displayed, indicating that the protected tag name has already been used.

Creating Protected Tag Rules for a Repository

  1. Go to the homepage of the repository Test_Repo, choose Settings > Policy Settings > protected tags, and click Create Protected Tag.

  2. Set parameters by referring to Table 2 Parameters for creating a protected tag. As shown in the following figure,Tag_* indicates that all branches starting with Tag_ are protected tags, and only codehub_mtest_022 can be created.

Table 2 Parameters for creating a protected tag

Parameter

Description

Tags

Mandatory. Enter a complete tag or a tag with a wildcard as required.

Only one branch can be added at a time. Batch adding is not supported. The value must start with refs/heads/ and end with *. Special characters are not allowed in other positions.

Add Permissions

Mandatory. Roles allowed to create protected tags. You can select member groups, members, or roles from the drop-down list.

Managing Protected Tag Rules

Click in the row where the protected tag rule is located to change the role that is allowed to submit tags.

Click in the Operation column of a protected tag rule to delete it.