.nh .TH "GT-AUTH" "1" "Nov 2026" "gitea-cli" "gitea-cli Manual" .SH NAME gt-auth - Authenticate gt and git with Gitea .SH SYNOPSIS \fBgt auth [flags]\fP .SH DESCRIPTION Authenticate gt and git with Gitea. .PP gt keeps the accounts of each instance in hosts.yml and their tokens in the system keyring, or in a private file when you choose so. One account per instance is active; --user or GITEA_CLI_USER selects another for a single command. GITEA_TOKEN, together with GITEA_CLI_HOST or GITEA_INSTANCE_URL, replaces the stored credentials of its instance for the active account too; it must belong to the account that --user or GITEA_CLI_USER names. See gt help environment for how commands select the instance. .SH OPTIONS \fB-h\fP, \fB--help\fP[=false] help for auth .SH OPTIONS INHERITED FROM PARENT COMMANDS \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--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 SEE ALSO \fBgt(1)\fP, \fBgt-auth-login(1)\fP, \fBgt-auth-logout(1)\fP, \fBgt-auth-refresh(1)\fP, \fBgt-auth-setup-git(1)\fP, \fBgt-auth-status(1)\fP, \fBgt-auth-switch(1)\fP, \fBgt-auth-token(1)\fP