gh es configure [flags]
Configures the CLI to be able to connect with the Manage GitHub Enterprise Server API and stores the configuration and provided authentication parameters locally.
-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)
-b
,--bootstrap
- Use bootstrap mode to only set the hostname for the initial configuration of a GHES appliance
-n
,--hostname <string>
- GHES instance hostname
-p
,--password <string>
- Password to authenticate with
-r
,--reset
- Use to reset and delete the currently configured CLI credentials locally
-s
,--status
- View current configuration status and verify connectivity
-u
,--username <string>
- Username to authenticate with
--address <string>
- The address of the GHES server
--json
- Format results as JSON
# Configure the CLI and enter the credentials interactively
$ gh es configure
# Configure the CLI and provide credentials as flags
$ gh es configure --hostname ghes.github.net --auth-type "root site administrator" --password passworD1
# View the current status of the local CLI configuration and verify the connection
$ gh es configure --status
# Configure CLI in bootstrap mode for the initial configuration of a GitHub Enterprise Server appliance
$ gh es configure --bootstrap
# Reset the local CLI configuration
$ gh es configure --reset
gh es ping
Ping the GitHub Enterprise Server instance and verify the stored API credentials.
--address <string>
- The address of the GHES server
--json
- Format results as JSON
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.
-p
,--password <string>
- New Password
-c
,--password-confirmation <string>
- Password Confirmation
--address <string>
- The address of the GHES server
--json
- Format results as JSON
$ gh es access set-password --password passworD1 --password-confirmation passworD1
gh es access get-ssh-key
Get SSH keys from the authorized_keys file on all configured nodes.
--address <string>
- The address of the GHES server
--json
- Format results as JSON
# Get configured SSH keys.
$ gh es access get-ssh-key
gh es access add-ssh-key [flags]
Add SSH key to the authorized_keys file on all configured nodes.
-i
,--file <string>
- Path of the SSH key to add
-k
,--key <string>
- SSH key to add
--address <string>
- The address of the GHES server
--json
- Format results as JSON
# Add an SSH Key.
$ gh es access add-ssh-key -k "ssh-rsa..."
# Add an SSH Key from a file.
$ gh es access add-ssh-key -i "/path/to/key.pub"
gh es access remove-ssh-key [flags]
Remove SSH key from the authorized_keys file on all configured nodes.
-i
,--file <string>
- Path of the SSH key to remove
-k
,--key <string>
- SSH key to remove
--address <string>
- The address of the GHES server
--json
- Format results as JSON
# Remove an SSH Key.
$ gh es access remove-ssh-key -k "ssh-rsa..."
# Remove an SSH Key from a file.
$ gh es access remove-ssh-key -i "/path/to/key.pub"
gh es cluster status [flags]
Get the status of services running on each cluster node.
-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
--address <string>
- The address of the GHES server
--json
- Format results as JSON
gh es config init [flags]
Bootstrap the GitHub Enterprise Server instance by initializing the configuration with a license and password.
-l
,--license <string>
- Path to license file
-p
,--password <string>
- Password for the root site administrator
--address <string>
- The address of the GHES server
--json
- Format results as JSON
gh es config get-metadata [flags]
Get GHES metadata for all configured nodes.
-r
,--cluster-role <string>
- Filter by cluster role
-u
,--uuid <string>
- Filter by node
--address <string>
- The address of the GHES server
--json
- Format results as JSON
gh es config apply [flags]
Initiate a config-apply run on all configured nodes.
-i
,--run-id <string>
- Filter by run id
--address <string>
- The address of the GHES server
--json
- Format results as JSON
# Trigger configapply run on the appliance.
$ gh es config apply
gh es config get-apply-status [flags]
Check config apply status on all configured nodes.
-r
,--cluster-role <string>
- Filter by cluster role
-i
,--run-id <string>
- Filter by run id
-u
,--uuid <string>
- Filter by node
--address <string>
- The address of the GHES server
--json
- Format results as JSON
# Check config-apply status on all nodes.
$ gh es config get-apply-status
# Check config-apply status on a specific node identified by its UUID (node metadata can be retrieved with 'gh es config metadata').
$ gh es config get-apply-status --uuid 12345678-1234-1234-1234-123456789012
# Check config-apply status on all nodes with a specific cluster role.
$ gh es config get-apply-status --cluster-role WebServer
# Check config-apply status on all nodes with a specific run id.
$ gh es config get-apply-status --run-id 123456
gh es config get-apply-events [flags]
Check config apply events on all configured nodes.
-r
,--cluster-role <string>
- Filter by cluster role
-i
,--event-id <string>
- Filter by event id
-u
,--uuid <string>
- Filter by node
--address <string>
- The address of the GHES server
--json
- Format results as JSON
# Check config-apply events on all nodes.
$ gh es config get-apply-events"
# Check config-apply events on a specific node identified by its UUID (node metadata can be retrieved with 'gh es config metadata').
$ gh es config get-apply-events" --uuid 12345678-1234-1234-1234-123456789012
# Check config-apply events on all nodes with a specific cluster role.
$ gh es config get-apply-events" --cluster-role WebServer
# Check config-apply events on all nodes with a specific evnt id.
$ gh es config get-apply-events" --event-id 12345678
gh es config get-license
Display the license information. Provide information about topology, seat counts, expiration date, etc...
--address <string>
- The address of the GHES server
--json
- Format results as JSON
gh es config check-license
Check the license information. Perform various checks like expiration date, topology check and file integrity.
--address <string>
- The address of the GHES server
--json
- Format results as JSON
gh es config import-license [flags]
Import a new license. This does not immediately apply the license to the GitHub Enterprise Server, and requires a config-apply run to use the new license.
-a
,--apply
- Wheter the license import command will rebuild the github application and apply the new license
-l
,--license <string>
- Path to license file
--address <string>
- The address of the GHES server
--json
- Format results as JSON
gh es config get-settings [flags]
Get current settings of the GitHub Enterprise Server instance, which are ready to be applied.
-t
,--target-hostname <string>
- (Optional) Run on node with specific hostname. Default to the cluster delegate.
--address <string>
- The address of the GHES server
--json
- Format results as JSON
gh es config set-settings [flags]
Update a subset or all of GHES settings in preparation to applying them.
-s
,--settings <string>
- Provide updated settings as JSON string
-t
,--target-hostname <string>
- (Optional) Run on node with specific hostname. Default to the cluster delegate.
--address <string>
- The address of the GHES server
--json
- Format results as JSON
# Update settings with a JSON string interactively
$ gh es config set-settings
# Supply settings to be updated as a JSON string
$ gh es config set-settings --settings '{"abuse_rate_limiting":{"cpu_millis_per_minute":500}}'
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.
-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')
--address <string>
- The address of the GHES server
--json
- Format results as JSON
# 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 [flags]
Check maintenance status on all configured nodes.
-r
,--cluster-role <string>
- Filter by cluster role
-u
,--uuid <string>
- Filter by node
--address <string>
- The address of the GHES server
--json
- Format results as JSON
# 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 [flags]
Get GHES version for all configured nodes.
-r
,--cluster-role <string>
- Filter by cluster role
-u
,--uuid <string>
- Filter by node
--address <string>
- The address of the GHES server
--json
- Format results as JSON
gh es replication status [flags]
Show replication status for each replication channel to the primary.
-r
,--cluster-role <string>
- Filter by cluster role
-u
,--uuid <string>
- Filter by node
--verbose
- Output detailed status for each replication and included services
--address <string>
- The address of the GHES server
--json
- Format results as JSON
gh es topologyconfig get
Get topology configuration from the GHES instance in INI style.
--address <string>
- The address of the GHES server
--json
- Format results as JSON
gh es topologyconfig set [flags]
Set GHES topology configuration by providing a path to the cluster configuration file. This command will store the uploaded configuration in the configuration management service.
-c
,--config <string>
- path to the cluster configuration file
--address <string>
- The address of the GHES server
--json
- Format results as JSON
$ gh es topologyconfig set --config /data/user/common/cluster.conf"
gh es topologyconfig verify [flags]
Verify GHES topology configuration by providing a path to the cluster configuration file. This command will not apply or upload the configuration.
-c
,--config <string>
- path to the cluster configuration file
--address <string>
- The address of the GHES server
--json
- Format results as JSON
$ gh es topologyconfig verify --config /data/user/common/cluster.conf
gh es topologyconfig diff [flags]
Compares the existing GHES topology configurations with a provided cluster configuration file. This command will not apply or upload the configuration.
-c
,--config <string>
- path to the cluster configuration file
--address <string>
- The address of the GHES server
--json
- Format results as JSON
$ gh es topologyconfig diff --config /data/user/common/cluster.conf
gh es checks system-requirements [flags]
Check if the configured cluster nodes meet the minimum system requirements in terms of memory, block storage size and root storage size depending on their configured role.
-c
,--cluster_config <string>
- Provide path for cluster config file
-e
,--external_hostname <string>
- (Optional) Provide a hostname to reach the cluster
--address <string>
- The address of the GHES server
--json
- Format results as JSON
gh es checks connectivity [flags]
Check if esstential ports are reachable on the cluster nodes.
-c
,--cluster_config <string>
- (Optional) Provide path for cluster config file. Defaults to the current cluster topology
-t
,--timeout <string>
- (Optional) Provide a timeout for the check. Defaults to 60
--address <string>
- The address of the GHES server
--json
- Format results as JSON