GitHub Enterprise automatically synchronizes its clock by connecting to NTP servers. You can set the NTP servers that are used to synchronize the clock, or you can use the default NTP servers.
Changing the default NTP servers
-
Open the Management Console settings in a browser window.
http(s)://hostname/setup/settings
In the left sidebar, click Time.
- Type the hostname of the primary NTP server in Primary NTP server and the hostname of the secondary NTP server in Secondary NTP server.
- At the bottom of the page, click Save settings.
- Wait for the configuration run to complete.
Correcting a large time drift
The NTP protocol continuously corrects small time synchronization discrepancies. You can use the administrative shell to synchronize time immediately.
Notes:
- You can't modify the Coordinated Universal Time (UTC) zone.
- You should prevent your hypervisor from trying to set the virtual machine's clock. For more information, see the documentation provided by the virtualization provider.
- Use the
ntpdate
command to synchronize the server with an NTP server. For example:
sudo service ntp stop sudo ntpdate 0.pool.ntp.org sudo service ntp start