GH-CONFIG-SET(1)
๐ gh-config-set(1) โ the GitHub CLI manual, bestie edition โจ
okay so this is gh-config-set, and yes it lives in the GitHub CLI manual (v2.102.0 energy, hi ๐). it's the glow-up page for setting one specific config key to one specific value. tiny command, huge main character energy. let's get into it ๐
๐ธ NAME ๐ธ
gh-config-set โ update configuration with a value for the given key ๐
like, you pick a key, you pick a value, and the config gets updated. that's the whole vibe check and it ate.
โจ SYNOPSIS โจ
gh config set <key> <value> [flags]
literally just <key> then <value> then whatever flags you're feeling. periodt ๐ซถ
๐ OPTIONS ๐
-h,--host <string>โ set this as a per-host setting ๐ so instead of changing the whole config globally, you're like "no bestie, this one's just for this host." very targeted, very intentional.
๐ฅ EXIT CODES ๐ฅ
the numbers that tell you how it went, no cap:
0: Successful execution โ slay ๐ it worked1: Error โ something went sideways ๐ญ2: Command canceled โ you (or something) hit the brakes ๐4: Authentication required โ the vibes need credentials ๐
โญ NOTE: specific commands may have additional exit codes. refer to the command's help for more information โ iykyk, always check the specific command's help before you spiral ๐ง
๐ฆ EXAMPLE ๐ฆ
okay these are the actual examples, copy-paste safe, character for character:
$ 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
look at that range ๐ฎโ๐จ setting your editor to plain vim, setting it to "code --wait" (quotes matter, don't @ me), picking git_protocol as ssh but only for github.com, pointing api_host at api-gateway.example.com but only for example.com, and turning prompt off. iconic behavior honestly ๐
๐ธ SEE ALSO ๐ธ
gh-config(1)โ go read the parent page, it's giving family reunion ๐ซถ
and that's the tea ๐ โ this page brought to you by GitHub CLI v2.102.0, dated Oct 2026. go forth and set responsibly, bestie ๐โจ
๐ฆ where this page comes from
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 ยท MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 ยท MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 ยท MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 ยท MIT
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms