ghe‐maintenance - elliottcarlson/ghe GitHub Wiki
The utility allows you to control the state of the remote Github Enterprise's maintenance mode.
Enabling maintenance mode disables site access to the instance, however Management Console access remains available. Users will be presented with a similar screen as below:
As with all scripts being run from within GHE CLI, the ghe-host, ghe-ssh-port, and ghe-ssh-user are automatically set and do not need to be provided.
Get maintenance mode status:
GHE> maintenance Maintenance mode is currently: OFF GHE>
Enable maintenance mode:
GHE> maintenance on Enabling maintenance mode... Maintenance mode is currently: ON GHE>
Disable maintenance mode:
GHE> maintenance off Disabling maintenance mode... Maintenance mode is currently: OFF GHE>
Help
GHE> maintenance -h usage: ghe-maintenance.py [-h] [-ghe-host HOST] [-ghe-ssh-port PORT] [-ghe-ssh-user USER] [-debug] [value] Tool to manage Github Enterprises maintenance status. positional arguments: value boolean value to set maintenance mode to (on|off, true|false, 1|0) optional arguments: -h, --help show this help message and exit -ghe-host HOST the hostname to your GitHub Enterprise server (default: value from `ghe-host` environment variable) -ghe-ssh-port PORT the port to your GitHub Enterprise SSH server (default: 122, or value from `ghe-ssh-port` environment variable) -ghe-ssh-user USER the user to use for SSH access to your GitHub Enterprise server (default: value from `ghe-ssh-user` environment variable) -debug enable debug mode To retrieve the current maintenance status of the GHE server: GHE> maintenance To enable maintenance mode on the GHE server: GHE> maintenance on To disable maintenance mode on the GHE server: GHE> maintenance off Accepted values: "on"|"off", "yes"|"no", "true"|"false", "t"|"f", "y"|"n, "1"|"0" GHE>