Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Smudge error: Error downloading

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?

like image 715
Dan-Dev Avatar asked Oct 02 '17 07:10

Dan-Dev


Video Answer


2 Answers

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.

like image 104
Dan-Dev Avatar answered Sep 26 '22 07:09

Dan-Dev


This corruption can happen due to another developer's misconfigured git-lfs that pushed to the repository, or sometimes due to some unusual failure during a push. Try re-sending the missing object (using its object ID) from a working tree:

git lfs push --object-id <remote> <oid>

The OID should be in the Smudge error message.

like image 38
Danger Avatar answered Sep 23 '22 07:09

Danger