Skip to content
Latchkey

CI "Clock skew detected" - Runner Time Drift Breaks Builds/Auth

The runner’s clock disagrees with file timestamps or a remote server. make warns about clock skew when a file’s mtime is in the future; TLS and signed tokens fail when the runner time is too far from real time.

What this error means

A build prints Clock skew detected. Your build may be incomplete, or a TLS/auth step fails with a certificate-not-yet-valid or expired-token error caused by the runner clock being wrong. It clears once the clock is corrected or the runner is replaced.

CI log
make: Warning: File 'main.o' has modification time 812 s in the future
make: warning:  Clock skew detected.  Your build may be incomplete.
# or, from TLS/auth:
x509: certificate has expired or is not yet valid: current time ... is before ...

Common causes

The runner clock drifted from real time

A VM whose clock was not synced (NTP not running, a paused/resumed instance, or a freshly booted runner before time sync) can be seconds-to-minutes off, which breaks time-sensitive checks.

Timestamps from a different clock

Files checked out or restored from a cache carry mtimes set by another machine. If those are ahead of the runner clock, make sees "future" files and warns about skew.

How to fix it

Check and correct the clock

Compare the runner time to a reference, and let it sync.

Terminal
date -u
timedatectl 2>/dev/null | grep -i 'synchronized'
# normalize source mtimes if needed:
find . -newer . -print  # spot future-dated files

Fix the cause

  1. Ensure NTP/chrony time sync is enabled on the runner image so the clock is correct at boot.
  2. For make skew from cache restores, normalize timestamps (touch sources) so none are future-dated.
  3. Retry on a freshly synced runner if a transient boot-time drift caused TLS/auth failures.

How to prevent it

  • Enable NTP/chrony on runner images so clocks are synced before jobs run.
  • Normalize file mtimes after cache restore to avoid future-dated sources.
  • Allow a small clock-skew tolerance where signed tokens are validated.

Frequently asked questions

What causes ""Clock skew detected""?
A VM whose clock was not synced (NTP not running, a paused/resumed instance, or a freshly booted runner before time sync) can be seconds-to-minutes off, which breaks time-sensitive checks.
How do I fix "Clock skew detected"?
Compare the runner time to a reference, and let it sync.
Can Latchkey fix this automatically?
Yes. Latchkey runs your GitHub Actions on managed runners that detect this failure, apply the fix, and retry the job automatically - self-healing is on by default.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card