Skip to Content
Native GitAdvancedTag Protection

Tag Protection

Tags usually mark released versions, so moving or deleting one can break the people who depend on it. Tag protection stops tags that match a pattern from being created, changed or deleted by anyone except the users and teams you allow.

Tag protection is available on the Enterprise plan.

Accessing Tag Protection Settings

To configure tag protection:

  1. Navigate to your API repository
  2. Select the Settings tab
  3. Go to Tags
  4. View existing rules under Tag Protection Rules or create new ones

Tag Settings page with two tag protection rules

Use the icons in the Action column to edit or delete a rule.

Creating a Protection Rule

Click the Add Tag Protection button and fill in the dialog:

  • Tag Patterns: A single name, a glob pattern such as v*, or a regular expression written between slashes, such as /^v[0-9]+$/
  • Allowed users: The users who may still create, change or delete matching tags
  • Allowed teams: The teams who may do so. This field is shown for organization repositories

If you leave both lists empty, nobody can change the matching tags.

Add Tag Protection dialog with the pattern, allowed users and allowed teams fields

Last updated on