GT-AUTH-SETUP-GIT(1) gitea-cli Manual GT-AUTH-SETUP-GIT(1) NAME gt-auth-setup-git - Configure git to use gt for credentials SYNOPSIS gt auth setup-git [flags] DESCRIPTION Configure git to ask gt for the credentials of an instance, so that git push and fetch over HTTPS use the active account, or the account of --user. gt's own clone and checkout commands do not need this. The instance's stored TLS client certificate and --insecure setting are configured for git too; GITEA_INSTANCE_INSECURE is never saved, and keeps an earlier --insecure setting in Git's configuration. Other credential helpers, such as a system keychain, are turned off for the instance: otherwise they answer first and keep a copy of gt's token. --keep-helpers keeps them. OPTIONS -h, --help[=false] help for setup-git --keep-helpers[=false] Keep other credential helpers for the instance; they are asked first and store gt's token --local[=false] Configure only the current Git repository instead of global Git configuration 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 EXAMPLE $ gt auth setup-git $ gt auth setup-git --host gitea.com # Only for the current repository, always as alice $ gt auth setup-git --local --user alice SEE ALSO gt-auth(1) gitea-cli Nov 2026 GT-AUTH-SETUP-GIT(1)