GH ES CLI usage documentation
February 13, 2024 ยท View on GitHub
gh es configure
gh es configure [flags]
Configures the CLI to be able to connect with the GitHub Enterprise Manage API and stores the configuration and provided authentication parameters locally.
Options
-t,--auth-type <string>- Type of authentication to use: {root site administrator|Management Console user account|internal API key}
-a,--auto- Use to auto-configure when running locally on the GHES instance (using internal API key authentication only)
-n,--hostname <string>- GHES instance hostname
-p,--password <string>- Password to authenticate with
-s,--status- View current configuration status and verify connectivity
-u,--username <string>- Username to authenticate with
Options inherited from parent commands
--json- Format results as JSON
Examples
$ gh es configure
$ gh es configure --hostname ghes.github.net --auth-type "root site administrator" --password passworD1
gh es ping
gh es ping
Ping the GHES instance and verify the stored API credentials.
Options inherited from parent commands
--json- Format results as JSON
gh es access set-password
gh es access set-password [flags]
Update GHES root site administrator password which is also used for access to the Management Console.
In the case that the CLI is currently configured using the root site administrator, the stored authentication parameters need to be updated by running the configure command.
Options
-p,--password <string>- New Password
-c,--password-confirmation <string>- Password Confirmation
Options inherited from parent commands
--json- Format results as JSON
Examples
$ gh es access set-password --password passworD1 --password-confirmation passworD1
gh es cluster status
gh es cluster status [flags]
Get the status of services running on each cluster node.
Options
-r,--cluster-role <string>- Filter by cluster role
-u,--uuid <string>- Filter by node
--verbose- Output detailed status for each cluster node and included services
Options inherited from parent commands
--json- Format results as JSON
gh es config metadata
gh es config metadata [flags]
Get GHES metadata for all configured nodes.
Options
-r,--cluster-role <string>- Filter by cluster role
-u,--uuid <string>- Filter by node
Options inherited from parent commands
--json- Format results as JSON
gh es maintenance set
gh es maintenance set [flags]
Configure the maintenance mode on all configured or specific UUID-identified nodes, including setting an IP exception list, enabling on a scheduled time in the future and providing a custom maintenance mode message.
Options
-e,--enabled <string>- Enable/disable maintenance mode: {true|false}
-i,--ip-exception-list <strings>- Configure an IP exception list by entering comma separated IP addresses or CIDR blocks
-m,--message <string>- Customize maintenance mode message
-u,--uuid <string>- Change maintenance mode for a specific node by entering node uuid
-w,--when <string>- Configure when to enable/disable maintenance mode, enter 'now' or a RFC3339 format time (e.g. '2024-01-02T15:04:05+00:00')
Options inherited from parent commands
--json- Format results as JSON
Examples
# Enable maintenance mode on all configured nodes.
$ gh es maintenance set --enabled true
# Disable maintenance mode on all configured nodes.
$ gh es maintenance set --enabled false
# Enable maintenance mode on a UUID-identified node (node metadata can be retrieved with 'gh es config metadata').
$ gh es maintenance set --enabled true --uuid 12345678-1234-1234-1234-123456789012
# Enable maintenance mode on all configured nodes on a schedule.
$ gh es maintenance set --enabled true --when 2024-01-02T15:04:05+00:00
# Enable maintenance mode on all configured nodes with an IP exception list, making the GHES appliance only accessible by the set IP addresses or CIDR blocks.
$ gh es maintenance set --enabled true --ip-exception-list "10.0.1.2,192.168.0.0/16"
# Enable maintenance mode on all configured nodes and display a custom message to end users.
$ gh es maintenance set --enabled true --message "Unavailable due to upgrade"
gh es maintenance get
gh es maintenance get [flags]
Check maintenance status on all configured nodes.
Options
-r,--cluster-role <string>- Filter by cluster role
-u,--uuid <string>- Filter by node
Options inherited from parent commands
--json- Format results as JSON
Examples
# Check maintenance status on all nodes.
$ gh es maintenance get
# Check maintenance status on a specific node identified by its UUID (node metadata can be retrieved with 'gh es config metadata').
$ gh es maintenance get --uuid 12345678-1234-1234-1234-123456789012
# Check maintenance status on all nodes with a specific cluster role.
$ gh es maintenance get --cluster-role WebServer
gh es release version
gh es release version [flags]
Get GHES version for all configured nodes.
Options
-r,--cluster-role <string>- Filter by cluster role
-u,--uuid <string>- Filter by node
Options inherited from parent commands
--json- Format results as JSON
gh es replication status
gh es replication status [flags]
Show replication status for each replication channel to the primary.
Options
-r,--cluster-role <string>- Filter by cluster role
-u,--uuid <string>- Filter by node
--verbose- Output detailed status for each replication and included services
Options inherited from parent commands
--json- Format results as JSON
gh es topologyconfig get
gh es topologyconfig get
Get topology configuration from the GHES instance in INI style.
Options inherited from parent commands
--json- Format results as JSON
gh es topologyconfig set
gh es topologyconfig set [flags]
Set GHES topology configuration by providing an INI-style configuration string.
Options
-c,--config <string>- Configure topology by providing string in INI-style
Options inherited from parent commands
--json- Format results as JSON
Examples
$ gh es topologyconfig set --config "$(cat <path-to-config-file>)"