Git LFS Fail- smudge error
Asked by carmmunity:

Im seeing the following error when I try to pull an image to our live server (**git-lfs/3.0.2 (GitHub; linux amd64; go 1.17)** ). The platform I'm pushing from is **git-lfs/3.0.2 (GitHub; windows amd64; go 1.17.2)**.

However when I do it the opposite way round - push from **git-lfs/3.0.2 (GitHub; linux amd64; go 1.17)** and pull to **git-lfs/3.0.2 (GitHub; windows amd64; go 1.17.2)**- it works fine.

Any ideas as to why?

Here is the error:

remote: Enumerating objects: 10, done.  
remote: Counting objects: 100% (10/10), done.  
remote: Compressing objects: 100% (6/6), done.  
remote: Total 6 (delta 4), reused 0 (delta 0), pack-reused 0  
Unpacking objects: 100% (6/6), 555 bytes \| 555.00 KiB/s, done.  
From <https://bitbucket.org/jackson/portal>  
b2af56503..d853cad14 master -\> origin/master  
Updating b2af56503..d853cad14  
Downloading public/images/test.png (12 KB)  
Error downloading object: public/images/test.png (f5c1ec3): Smudge error: Error downloading public/images/test.png (f5c1ec35c71ccf16e98c149fbafdb3246971249f57d8e801076ee1814a7ccdb1): batch response: Repository or object not found: <https://jackson@bitbucket.org/jackson/portal.git/objects/batch>  
Check that it exists and that you have proper access to it

Errors logged to /home/jacksonco/public_html/portal/.git/lfs/logs/20211203T092051.526380712.log  
Use \`git lfs logs last\` to view the log.  
error: external filter 'git-lfs filter-process' failed  
fatal: public/images/test.png: smudge filter lfs failed


Answers:
author: carmmunity
body: Ive posted below


author: Norbert C
body: [@carmmunity](/t5/user/viewprofilepage/user-id/2983572)

Thank you for contacting Atlassian Community, I'm Norbert from Atlassian Bitbucket Cloud Support, it's nice to meet you!

Based on my observation, when you're pulling from the Linux machine, you're facing the smudge error, but when you're pulling from the Windows machine, you're not having any LFS smudge error. Can you confirm whether if this is the behavior what you're experiencing?

I suspect what you're experiencing could be an authentication issue. Can I ask you to generate an app password and use the app password with the combination of your username? [App passwords - Atlassian Documentation](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/)

In case using the app passwords doesn't resolve your issue, can I ask you to provide us the output of "git lfs logs last" and masking the private/confidential information?

We're looking forward to hear from you.

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support

comments: author: carmmunity
body: Hi, here is the log:

git-lfs/3.0.2 (GitHub; linux amd64; go 1.17)  
git version 2.31.1

$ git-lfs filter-process  
Error downloading object: public/images/l4vhooklock.jpg (6bab6cf): Smudge error: Error downloading public/images/l4vhooklock.jpg (6bab6cff3f938583b05e1faf8313cdbcad2e823443b499517a997441f307e371): batch response: Repository or object not found: <https://carmmunity@bitbucket.org/carmmunity/portal.git/objects/batch>  
Check that it exists and that you have proper access to it

Repository or object not found: <https://carmmunity@bitbucket.org/carmmunity/portal.git/objects/batch>  
Check that it exists and that you have proper access to it  
github.com/git-lfs/git-lfs/v3/errors.Errorf  
src/git-lfs/errors/errors.go:69  
github.com/git-lfs/git-lfs/v3/lfshttp.defaultError  
src/git-lfs/lfshttp/errors.go:128  
github.com/git-lfs/git-lfs/v3/lfshttp.(\*Client).handleResponse  
src/git-lfs/lfshttp/errors.go:51  
github.com/git-lfs/git-lfs/v3/lfshttp.(\*Client).DoWithRedirect  
src/git-lfs/lfshttp/client.go:330  
github.com/git-lfs/git-lfs/v3/lfsapi.(\*Client).doWithCreds  
src/git-lfs/lfsapi/auth.go:101  
github.com/git-lfs/git-lfs/v3/lfsapi.(\*Client).doWithAuth  
src/git-lfs/lfsapi/auth.go:67  
github.com/git-lfs/git-lfs/v3/lfsapi.(\*Client).DoWithAuth  
src/git-lfs/lfsapi/auth.go:25  
github.com/git-lfs/git-lfs/v3/lfsapi.(\*Client).DoAPIRequestWithAuth  
src/git-lfs/lfsapi/auth.go:56  
github.com/git-lfs/git-lfs/v3/tq.(\*tqClient).Batch  
src/git-lfs/tq/api.go:92  
github.com/git-lfs/git-lfs/v3/tq.Batch  
src/git-lfs/tq/api.go:43  
github.com/git-lfs/git-lfs/v3/tq.(\*TransferQueue).enqueueAndCollectRetriesFor  
src/git-lfs/tq/transfer_queue.go:558  
github.com/git-lfs/git-lfs/v3/tq.(\*TransferQueue).collectBatches.func1  
src/git-lfs/tq/transfer_queue.go:452  
runtime.goexit  
go/src/runtime/asm_amd64.s:1581  
batch response  
github.com/git-lfs/git-lfs/v3/errors.newWrappedError  
src/git-lfs/errors/types.go:225  
github.com/git-lfs/git-lfs/v3/errors.Wrap  
src/git-lfs/errors/errors.go:74  
github.com/git-lfs/git-lfs/v3/tq.(\*tqClient).Batch  
src/git-lfs/tq/api.go:95  
github.com/git-lfs/git-lfs/v3/tq.Batch  
src/git-lfs/tq/api.go:43  
github.com/git-lfs/git-lfs/v3/tq.(\*TransferQueue).enqueueAndCollectRetriesFor  
src/git-lfs/tq/transfer_queue.go:558  
github.com/git-lfs/git-lfs/v3/tq.(\*TransferQueue).collectBatches.func1  
src/git-lfs/tq/transfer_queue.go:452  
runtime.goexit  
go/src/runtime/asm_amd64.s:1581  
Error downloading public/images/l4vhooklock.jpg (6bab6cff3f938583b05e1faf8313cdbcad2e823443b499517a997441f307e371)  
github.com/git-lfs/git-lfs/v3/errors.newWrappedError  
src/git-lfs/errors/types.go:225  
github.com/git-lfs/git-lfs/v3/errors.Wrapf  
src/git-lfs/errors/errors.go:85  
github.com/git-lfs/git-lfs/v3/lfs.(\*GitFilter).downloadFile  
src/git-lfs/lfs/gitfilter_smudge.go:119  
github.com/git-lfs/git-lfs/v3/lfs.(\*GitFilter).Smudge  
src/git-lfs/lfs/gitfilter_smudge.go:78  
github.com/git-lfs/git-lfs/v3/commands.smudge  
src/git-lfs/commands/command_smudge.go:127  
github.com/git-lfs/git-lfs/v3/commands.filterCommand  
src/git-lfs/commands/command_filter_process.go:122  
github.com/spf13/cobra.(\*Command).execute  
go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:766  
github.com/spf13/cobra.(\*Command).ExecuteC  
go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:852  
github.com/spf13/cobra.(\*Command).Execute  
go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:800  
github.com/git-lfs/git-lfs/v3/commands.Run  
src/git-lfs/commands/run.go:105  
main.main  
src/git-lfs/rpm/BUILD/git-lfs-3.0.2/src/github.com/git-lfs/git-lfs/git-lfs.go:33  
runtime.main  
go/src/runtime/proc.go:255  
runtime.goexit  
go/src/runtime/asm_amd64.s:1581  
Smudge error  
github.com/git-lfs/git-lfs/v3/errors.newWrappedError  
src/git-lfs/errors/types.go:225  
github.com/git-lfs/git-lfs/v3/errors.NewSmudgeError  
src/git-lfs/errors/types.go:311  
github.com/git-lfs/git-lfs/v3/lfs.(\*GitFilter).Smudge  
src/git-lfs/lfs/gitfilter_smudge.go:87  
github.com/git-lfs/git-lfs/v3/commands.smudge  
src/git-lfs/commands/command_smudge.go:127  
github.com/git-lfs/git-lfs/v3/commands.filterCommand  
src/git-lfs/commands/command_filter_process.go:122  
github.com/spf13/cobra.(\*Command).execute  
go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:766  
github.com/spf13/cobra.(\*Command).ExecuteC  
go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:852  
github.com/spf13/cobra.(\*Command).Execute  
go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:800  
github.com/git-lfs/git-lfs/v3/commands.Run  
src/git-lfs/commands/run.go:105  
main.main  
src/git-lfs/rpm/BUILD/git-lfs-3.0.2/src/github.com/git-lfs/git-lfs/git-lfs.go:33  
runtime.main  
go/src/runtime/proc.go:255  
runtime.goexit  
go/src/runtime/asm_amd64.s:1581

Current time in UTC:  
2021-12-08 09:22:28

ENV:  
LocalWorkingDir=/home/carmmunityco/public_html/portal  
LocalGitDir=/home/carmmunityco/public_html/portal/.git  
LocalGitStorageDir=/home/carmmunityco/public_html/portal/.git  
LocalMediaDir=/home/carmmunityco/public_html/portal/.git/lfs/objects  
LocalReferenceDirs=  
TempDir=/home/carmmunityco/public_html/portal/.git/lfs/tmp  
ConcurrentTransfers=8  
TusTransfers=false  
BasicTransfersOnly=false  
SkipDownloadErrors=false  
FetchRecentAlways=false  
FetchRecentRefsDays=7  
FetchRecentCommitsDays=0  
FetchRecentRefsIncludeRemotes=true  
PruneOffsetDays=3  
PruneVerifyRemoteAlways=false  
PruneRemoteName=origin  
LfsStorageDir=/home/carmmunityco/public_html/portal/.git/lfs  
AccessDownload=basic  
AccessUpload=basic  
DownloadTransfers=basic,lfs-standalone-file,ssh  
UploadTransfers=basic,lfs-standalone-file,ssh  
GIT_REFLOG_ACTION=pull  
GIT_PREFIX=  
GIT_EXEC_PATH=/usr/local/cpanel/3rdparty/libexec/git-core


author: Norbert C
body: Hi [@carmmunity](/t5/user/viewprofilepage/user-id/2983572)

Thank you for the output.

Based on my observation the "l4vhooklock.jpg" file doesn't exist at the LFS part of the repository. To confirm this, can I ask you to visit the following page and verify whether if this file exist? <https://bitbucket.org/carmmunity/portal/admin/lfs/file-management/>

In case the file is there, can you tell us how the file has been uploaded?

We're looking forward to hear from you.

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support


author: carmmunity
body: Hi, yes that was the issue, the file didn't exist on the server but somehow was still being tracked.

Thanks for your help.


Tags: atl-gruland

bitbucket-cloud

cloud

git-lfs

image