---
name: "gh-config-set"
section: "1"
platform: "linux"
package: "github-cli"
version: "2.102.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/gh-config-set"
---

# gh-config-set(1)

Update configuration with a value for the given key

## NAME

gh-config-set - Update configuration with a value for the given key

## SYNOPSIS

**gh config set \<key\> \<value\> \[flags\]**

## OPTIONS

- **-h**, **--host** **\<string\>**

  Set per-host setting

## EXIT CODES

0: Successful execution

1: Error

2: Command canceled

4: Authentication required

NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.

## EXAMPLE

```
$ gh config set editor vim
$ gh config set editor "code --wait"
$ gh config set git_protocol ssh --host github.com
$ gh config set api_host api-gateway.example.com --host example.com
$ gh config set prompt disabled
```

## SEE ALSO

**[gh-config(1)](/gh-config/1.md)**
