Git LFS "git-lfs: command not found" from filter-process in CI
git invoked the LFS filter but the git-lfs executable is not on the runner PATH. Without the binary, the smudge/clean filters cannot run and checkout of LFS files fails.
What this error means
checkout fails with "git: 'lfs' is not a git command" or "git-lfs: command not found", often as "error: external filter 'git-lfs filter-process' failed".
git: 'lfs' is not a git command. See 'git --help'.
error: external filter 'git-lfs filter-process' failed
fatal: assets/model.bin: smudge filter lfs failedCommon causes
git-lfs is not installed on the runner image
A slim or self-hosted image ships git but not the separate git-lfs package, so the filter command does not exist.
git-lfs is installed but not initialized
Even when the binary exists, git lfs install may not have registered the filters for the user running the job.
How to fix it
Install and initialize git-lfs
- Install the
git-lfspackage on the runner. - Run
git lfs installto register the smudge/clean filters. - Re-run the checkout so the filter resolves.
sudo apt-get update && sudo apt-get install -y git-lfs
git lfs installUse a runner image that bundles git-lfs
GitHub-hosted runners include git-lfs by default; for self-hosted or container jobs, bake it into the image so no per-job install is needed.
How to prevent it
- Include git-lfs in self-hosted and container runner images.
- Run
git lfs installonce during image setup. - Pin a git-lfs version so behavior is consistent across runners.