---
name: "gt-config-set"
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-config-set"
---

# gt-config-set(1)

Change a setting

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

**[gt-config(1)](/man/gt-config/1.md)**
