Object Does Not Exist
Smudge error: Object does not exist: [404] - smudge filter lfs failed - the LFS object never reached the server, and how to push it.
LFS Object Does Not Exist
Symptom
A clone downloads the repository, then fails to check out an LFS file (exit status 128):
Downloading asset.bin (66 KB)
Error downloading object: asset.bin (05ceb3c): Smudge error: Error downloading asset.bin (05ceb3c0…): [05ceb3c0…] Object does not exist: [404] Object does not exist
error: external filter 'git-lfs filter-process' failed
fatal: asset.bin: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
git lfs pull in an existing clone fails the same way:
Object does not exist: [404]
Failed to fetch some objects from 'https://<INSTANCE>.git.eu/<USERNAME>/<REPO>.git/info/lfs'
Cause
The commit holds the LFS pointer, but the LFS object never reached the server. git.eu accepts such a push: it does not check that the objects exist.
- The push used
git push --no-verify, which skips the git-lfspre-pushhook that uploads the objects. - The
pre-pushhook was missing on the machine that pushed (git-lfs installed after the clone withoutgit lfs install, or the hook deleted). - The repository was imported from elsewhere without its LFS objects.
Diagnose
1. Clone without downloading LFS content, so the checkout works:
GIT_LFS_SKIP_SMUDGE=1 git clone https://<INSTANCE>.git.eu/<USERNAME>/<REPO>.git
2. List the LFS files of the clone:
git lfs ls-files
05ceb3c032 - asset.bin: the - means only the pointer is present. git lfs pull then reports Object does not exist: [404] for each object the server lacks.
3. On the machine that pushed the commit, run git lfs ls-files in its clone: * next to the file means that clone still holds the object.
Fix
Option A - Push the objects again (recommended)
From a clone that holds the objects (usually the one that made the commit), upload every LFS object its local refs point to:
git lfs push --all origin
Option B - Replace the file
No clone holds the object any more: add the file again from its original source, commit it with git-lfs installed, and push. Until then, GIT_LFS_SKIP_SMUDGE=1 (Diagnose step 1) gives a working clone with a pointer in place of the file.
Verify
git lfs pull
git lfs ls-files
git lfs pull ends without error and git lfs ls-files shows 05ceb3c032 * asset.bin (*: the object is now present). A fresh clone checks out with no error.
Prevent
- Never push with
git push --no-verifyin a repository that uses Git LFS. - Run
git lfs installonce on every machine: it installs thepre-pushhook that uploads the objects. - After an import, push the LFS objects with
git lfs push --all origin.