LinuxCommandLibrary

gh-config

manage GitHub CLI settings and preferences

TLDR

Get config value

$ gh config get [key]
copy
Set config value
$ gh config set [key] [value]
copy
List all configuration
$ gh config list
copy
Set default editor
$ gh config set editor [vim]
copy
Set default browser
$ gh config set browser [firefox]
copy

SYNOPSIS

gh config command [options]

DESCRIPTION

gh config manages configuration for the GitHub CLI. It controls behavior settings like preferred editor, browser, default prompts, and protocol preferences.
Configuration is stored per-host, allowing different settings for github.com and GitHub Enterprise instances. Settings can be environment-specific or global.
Common settings include git_protocol (https/ssh), editor, browser, and pager.

PARAMETERS

get KEY

Get a configuration value.
set KEY VALUE
Set a configuration value.
list
List all configuration settings.
--host HOSTNAME
Apply to specific GitHub host.
--help
Display help information.

CONFIGURATION

~/.config/gh/config.yml

Main configuration file storing user preferences, default settings, and per-host configurations.

CAVEATS

Config stored in ~/.config/gh/config.yml. Environment variables may override settings. Some settings require reauthentication to take effect.

HISTORY

gh config is part of the GitHub CLI, providing user customization following XDG Base Directory conventions on Unix systems.

SEE ALSO

gh(1), gh-auth(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community