.nh .TH "GT-TAG-PROTECT" "1" "Nov 2026" "gitea-cli" "gitea-cli Manual" .SH NAME gt-tag-protect - Protect the tags matching a pattern .SH SYNOPSIS \fBgt tag protect ... [flags]\fP .SH DESCRIPTION Add a rule for each pattern, a tag name or a glob such as v*, so that only the users of --allow-user and the teams of --allow-team may create the matching tags. The teams are those of the organization that owns the repository, so --allow-team requires an organization. Creating a tag also takes write access, and Gitea lists only the users and teams that can read the repository: gt warns about those it leaves out. .PP When a pattern has a rule already, the lists that the flags name are replaced and the other one stays. An empty --allow-user= removes every user from the rule. A rule that lists nobody stops everyone from creating the matching tags. .SH OPTIONS \fB--allow-team\fP=[] Teams of the repository's organization that may create the matching tags (repeatable) .PP \fB--allow-user\fP=[] Users that may create the matching tags (repeatable) .PP \fB--dry-run\fP[=false] Show the write requests gt would send, without sending them .PP \fB-h\fP, \fB--help\fP[=false] help for protect .SH OPTIONS INHERITED FROM PARENT COMMANDS \fB--cwd\fP="" Working \fBdirectory\fR for repository discovery .PP \fB--debug\fP[=false] Log the method, URL, status, and duration of each HTTP request to stderr .PP \fB--host\fP="" Gitea instance \fBURL\fR, including any base path .PP \fB--interactive\fP[=false] Allow prompts with machine output .PP \fB--no-input\fP[=false] Disable prompts and implicit editor/browser interactions .PP \fB--remote\fP="" Git \fBremote\fR used for repository discovery .PP \fB-R\fP, \fB--repo\fP="" Select a repository as \fBOWNER/REPO\fR or URL .PP \fB--sudo\fP="" Perform API requests as this \fBuser\fR (requires an administrator account) .PP \fB--user\fP="" Account \fBname\fR on the selected instance .SH EXAMPLE .EX # Only the release team may create version tags $ gt tag protect 'v*' --allow-team release # Replace the users of the rule with alice and bob, keeping its teams $ gt tag protect 'v*' --allow-user alice,bob # Remove every user from the rule, keeping its teams $ gt tag protect 'v*' --allow-user= .EE .SH SEE ALSO \fBgt-tag(1)\fP