---
name: "gt-auth"
section: "1"
platform: "linux"
package: "gitea-cli"
version: "1.0.0-1"
release: "Arch Linux 2026-11-07"
platforms: ["linux"]
url: "https://carta.tech/man/gt-auth"
---

# gt-auth(1)

Authenticate gt and git with Gitea

## NAME

gt-auth - Authenticate gt and git with Gitea

## SYNOPSIS

**gt auth \[flags\]**

## DESCRIPTION

Authenticate gt and git with Gitea.

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.

## OPTIONS

**-h**, **--help**\[=false\]\
 	help for auth

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

## SEE ALSO

**[gt(1)](/man/gt/1.md)**, **[gt-auth-login(1)](/man/gt-auth-login/1.md)**, **[gt-auth-logout(1)](/man/gt-auth-logout/1.md)**, **[gt-auth-refresh(1)](/man/gt-auth-refresh/1.md)**, **[gt-auth-setup-git(1)](/man/gt-auth-setup-git/1.md)**, **[gt-auth-status(1)](/man/gt-auth-status/1.md)**, **[gt-auth-switch(1)](/man/gt-auth-switch/1.md)**, **[gt-auth-token(1)](/man/gt-auth-token/1.md)**
