Scroll to navigation

GT-TAG-PROTECT(1) gitea-cli Manual GT-TAG-PROTECT(1)

NAME

gt-tag-protect - Protect the tags matching a pattern

SYNOPSIS

gt tag protect <pattern>... [flags]

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. Gitea lists only the users and teams that can read the repository.

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.

OPTIONS

--allow-team=[] Teams of the repository's organization that may create the matching tags (repeatable)

--allow-user=[] Users that may create the matching tags (repeatable)

--dry-run[=false] Show the write requests gt would send, without sending them

-h, --help[=false] help for protect

OPTIONS INHERITED FROM PARENT COMMANDS

--cwd="" Working directory for repository discovery

--debug[=false] Log the method, URL, status, and duration of each HTTP request to stderr

--host="" Gitea instance URL, including any base path

--interactive[=false] Allow prompts with machine output

--no-input[=false] Disable prompts and implicit editor/browser interactions

--remote="" Git remote used for repository discovery

-R, --repo="" Select a repository as OWNER/REPO or URL

--sudo="" Perform API requests as this user (requires an administrator account)

--user="" Account name on the selected instance

EXAMPLE

# 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=

SEE ALSO

gt-tag(1)

Nov 2026 gitea-cli