glab service-account token revoke
Revoke a token of a service account.
Synopsis
Revoke a personal access token of a service account of a project or a group.
- Anything authenticating with the token stops working immediately.
- A token name matches active tokens only. If several active tokens share the name, use the token ID instead.
- Numeric arguments are always treated as IDs. Token IDs and names come from
glab service-account token list.
Revoking a token of a group service account requires GitLab 17.11 or later.
glab service-account token revoke <account-id | username> <token-id | name> [flags]Examples
# Revoke token 7 of service account 42 of the current project
glab service-account token revoke 42 7
# Revoke a token by its name, finding the account by its username
glab service-account token revoke release-bot ci
# Revoke a token of a group's service account
glab service-account token revoke 42 7 --group my-group
Options
-g, --group group Revoke a token of a service account of a group instead of a project. Accepts a group ID or full path.
-R, --repo string Select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted.Options inherited from parent commands
-h, --help Show help for this command.