| GT-CONFIG-SET(1) | gitea-cli Manual | GT-CONFIG-SET(1) |
NAME
gt-config-set - Change a setting
SYNOPSIS
gt config set <key> <value> [flags]
DESCRIPTION
Change a preference, an instance setting (--host) or an account setting (--host and --user).
Preferences:
default_host instance to use when no flag or repository selects one
git_protocol https or ssh, for clones and remotes
editor command that edits bodies and messages, such as "code
--wait"
prompt enabled or disabled; disabled turns prompts off
pager command that pages long output on a terminal; GITEA_CLI_PAGER overrides
it
browser command that opens URLs; never disables opening
color auto, always or never
hyperlinks auto, always or never, for clickable links in terminals
markdown auto renders Markdown on a terminal, raw prints the source
remote Git remote tried first to find the repository of a clone and to push
to
http_timeout longest wait for the instance to answer a request, such as 30s,
or for more
data while a transfer stalls; 0 waits as long as it takes; a transfer that
keeps moving and migrations are not cut off. The wait for an answer starts
once an upload has reached the instance's machine, so an instance that reads
uploads slowly from its connection needs a longer timeout
extensions enabled or disabled; disabled refuses to install or run extensions
extension_hosts, extension_owners
comma-separated instance URLs, or HOST/OWNER such as
https://gitea.com/gitea, that extensions may come from; empty allows any
Instance settings: ssh_host, insecure, git_protocol, oauth_client_id, and headers: "Name: value" adds a header to every API request to the instance, such as an access proxy needs, "Name:" removes it, and a value of $NAME or ${NAME} is read from that environment variable when sent; client_cert and client_key name the PEM files of a TLS client certificate for an instance that requires one; without client_key, the key is read from client_cert, and clearing client_cert clears client_key. The active account (user) changes with gt auth switch. Account settings: ssh_key, ssh_agent, ssh_certificate_principal, ssh_key_fingerprint. As in Git, GIT_SSH_COMMAND in the environment takes precedence over ssh_key.
OPTIONS
-h, --help[=false] help for set
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 config set editor "code --wait" $ gt config set ssh_host git.example.com:2222 --host https://example.com $ gt config set ssh_key ~/.ssh/id_ed25519 --host https://example.com --user alice
SEE ALSO
| Nov 2026 | gitea-cli |