Skip to content
Latchkey

Git LFS version mismatch on a self-hosted runner in CI

A self-hosted runner with an outdated git-lfs can fail transfers or behave differently from hosted runners: missing flags, older batch behavior, or bugs fixed in later releases. Upgrading the binary resolves it.

What this error means

LFS operations that work on GitHub-hosted runners fail only on self-hosted ones, and git lfs version shows a much older release than the hosted image.

git-lfs
$ git lfs version
git-lfs/2.9.2 (GitHub; linux amd64; go 1.13)
# hosted runners ship a far newer git-lfs; behavior differs

Common causes

The runner has an old distro git-lfs package

A stale OS package pins git-lfs to an old release that lacks flags or fixes the workflow relies on.

The binary was never upgraded on the host

Self-hosted runners are not auto-updated, so git-lfs stays at whatever was installed initially.

How to fix it

Upgrade git-lfs on the runner

  1. Install a current git-lfs from the official packagecloud repo or a release tarball.
  2. Run git lfs install to re-register filters.
  3. Verify with git lfs version and re-run the job.
Terminal
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install -y git-lfs
git lfs install

Bake a current git-lfs into the runner image

For container or VM images, install a pinned recent git-lfs during image build so every job starts current.

How to prevent it

  • Pin and periodically bump git-lfs in self-hosted images.
  • Match the git-lfs version to what hosted runners ship.
  • Check git lfs version in a setup step for drift.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →