gt-auth-logout(1)

gt-auth-logout1

Log out of an account

Usage

gt auth logout [<user>] [flags]

Overview

Log out of an account: gt forgets the account and deletes its stored credential. Git's other credential helpers are asked to forget what they stored for the account on the instance, such as a copy of its token that a keychain kept after a push. When the instance of default_host has no account left, default_host moves to the only other instance with accounts, or is unset.

Options

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

Options inherited from parent commands

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

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

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

-y, --yes[=false]
Accept confirmations without prompting

Examples

$ gt auth logout
$ gt auth logout bob --host gitea.com
# Without confirmation
$ gt auth logout alice --yes

From gitea-cli 1.0.0-1 in Arch Linux 2026-11-07. Parsed by carta from the page's man source.