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 version
git-lfs/2.9.2 (GitHub; linux amd64; go 1.13)
# hosted runners ship a far newer git-lfs; behavior differsCommon 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
- Install a current git-lfs from the official packagecloud repo or a release tarball.
- Run
git lfs installto re-register filters. - Verify with
git lfs versionand re-run the job.
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install -y git-lfs
git lfs installBake 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 versionin a setup step for drift.