This version of GitHub Enterprise will be discontinued on This version of GitHub Enterprise was discontinued on 2020-11-12. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Recovering a high availability configuration

After failing over to a GitHub Enterprise Server appliance, you should regain redundancy as soon as possible rather than rely on a single appliance.

Did this doc help you?

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.

You can use the former primary appliance as the new replica appliance if the failover was planned or was not related to the health of the appliance. If the failover was related to an issue with the primary appliance, you may prefer to create a new replica appliance. For more information, see "Creating a high availability replica."

Configuring a former primary appliance as a new replica

  1. Connect to the former primary appliance's IP address using SSH.

    $ ssh -p 122 admin@FORMER PRIMARY IP
  2. On the former primary appliance, run ghe-repl-setup with the IP address of the former replica.

    $ ghe-repl-setup FORMER REPLICA IP
  3. To add the public key to the list of authorized keys on the primary appliance, browse to https://PRIMARY-HOSTNAME/setup/settings and add the key you copied from the replica to the list.

  4. To verify the connection to the new primary and enable replica mode for the new replica, run ghe-repl-setup again.

    $ ghe-repl-setup FORMER REPLICA IP
  5. To start replication of the datastores, use the ghe-repl-start command.

    $ ghe-repl-start

    Warning: ghe-repl-start causes a brief outage on the primary server, during which users may see internal server errors. To provide a friendlier message, run ghe-maintenance -s on the primary node before running ghe-repl-start on the replica node to put the appliance in maintenance mode. Once replication starts, disable maintenance mode with ghe-maintenance -u.

Did this doc help you?

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.