Updated on 2025-03-27 GMT+08:00

Configuring Protected Tag Rules

Constraints

  • To configure protected tag rules for a repository, you need to have the necessary permissions. For details, see Configuring Repo-Level Permissions.
  • 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

Go to the target repository homepage, choose Settings > Policy Settings > Protected Tags, click Create Protected Tag, and set parameters by referring to the following table.

Table 1 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.

Allowed to Create

Mandatory. Roles allowed to create protected tags. You can select a role with permission to create protected tags from the drop-down list box.

Managing Protected Tag Rules

Click the drop-down list under the Allow to Create column of the protected tag rule to modify the roles that are allowed to submit tags.

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