Smudge error: Error downloading

Dan-Dev picture Dan-Dev · Oct 2, 2017 · Viewed 23.8k times · Source

I'm not sure if this is the right forum to discuss git-lfs but as we have a tag for it I'll post my question. I have read the "Troubleshoot Git LFS in Bitbucket" page.

I'm getting the following error when runing:

ssh-agent bash -c 'ssh-add /home/dan/.ssh/keyname;  git clone [email protected]:[repo name removed].git' 

$ git-lfs smudge -- [Filename removed].zip Error downloading object: [Filename removed].zip ([code removed]): Smudge error: Error downloading [Filename removed].zip ([code removed]): [[code removed] Object does not exist on the server: [404] Object does not exist on the server

[404] Object does not exist on the server github.com/git-lfs/git-lfs/errors.newWrappedError /tmp/docker_run/src/github.com/git-lfs/git-lfs/errors/types.go:170: [[code removed]] Object does not exist on the server github.com/git-lfs/git-lfs/errors.newWrappedError /tmp/docker_run/src/github.com/git-lfs/git-lfs/errors/types.go:170: Error downloading [Filename removed].zip ([code removed]) github.com/git-lfs/git-lfs/errors.newWrappedError /tmp/docker_run/src/github.com/git-lfs/git-lfs/errors/types.go:170: Smudge error

Has anyone got any advice?

Answer

Dan-Dev picture Dan-Dev · Oct 2, 2017

I eventually found an answer by strich: on https://github.com/git-lfs/git-lfs/issues/911

I've had similar issues in the past and I think there may be a potential bug in cloning with git lfs (Still to be determined). You can try this method of fetching the repo, which is in fact faster too:

// Skip smudge - We'll download binary files later in a faster batch
git lfs install --skip-smudge

// Do git clone here
git clone ...

// Fetch all the binary files in the new clone 
git lfs pull

// Reinstate smudge
git lfs install --force 

This only needs to be done once to initialize the clone for the first time.

Please do test it and let me know if it fixes it.