Git lfs error downloading object

What to do when git's smudge filter lfs fails

I ran into this problem recently, when attempting to migrate a repository (repo) from my personal gitea instance to github. It started innocently enough. I had a git repository and wanted to test parallel test runs with cypress. The CI provider I was using (drone), did not support this feature and, after speaking with the cypress folks, they suggested trying with github actions. Sure. Why not. Should be easy. Little did I know this would lead me down a git-lfs sized rabbit hole.

So, first things first, I performed the git repo migration incorrectly. I forgot all about the git-lfs files that were in this repo, so my migration looked something like this.

  1. Modify existing repo’s .git/config file to replace origin and point to github.
  2. Push to github
  3. Done

The problem with doings things this way is that there are things that need to happen to push the lfs stored objects to their new location that did not happen.

When cloning, git is not set up—by default—to automatically download files from the lfs location. Everything seemed fine when I cloned the repo from the new location, like so:

Cloning into 'inspiringhopechurch.com.g'...
remote: Enumerating objects: 1748, done.
remote: Counting objects: 100% (1748/1748), done.
remote: Compressing objects: 100% (519/519), done.
remote: Total 1748 (delta 1210), reused 1727 (delta 1197), pack-reused 0
Receiving objects: 100% (1748/1748), 5.48 MiB | 5.33 MiB/s, done.
Resolving deltas: 100% (1210/1210), done.

But it should have looked more like so:

Cloning into 'inspiringhopechurch.com.g'...
remote: Enumerating objects: 1748, done.
remote: Counting objects: 100% (1748/1748), done.
remote: Compressing objects: 100% (519/519), done.
remote: Total 1748 (delta 1210), reused 1727 (delta 1197), pack-reused 0
Receiving objects: 100% (1748/1748), 5.48 MiB | 4.99 MiB/s, done.
Resolving deltas: 100% (1210/1210), done.
Filtering content: 100% (12/12), 47.80 MiB | 7.65 MiB/s, done.

If we have already cloned, we can use the git lfs command within the repo to pull the lfs files with git lfs pull. Even with these options there are still problems. We still haven’t pushed to the new repo’s lfs storage yet. So a git lfs pull will give the following error:

[7bc8118e51aac96a07f0123b5dfa8325a9d7404fa998d63776f08a9cc8237c0c] 
Object does not exist on the server: [404] Object does not exist on the server
error: failed to fetch some objects from 'https://github.com/user/repo.git/info/lfs

To make git pull from lfs storage while cloning we can add some options to ~/.gitconfig, e.g.:

[filter "lfs"]
	clean = git-lfs clean -- %f
	smudge = git-lfs smudge -- %f
	process = git-lfs filter-process
	required = true

But if we do that then (since the repo still doesn’t have the lfs files) you’ll get a smudge error during cloning:

Cloning into 'repo'...
remote: Enumerating objects: 1736, done.
remote: Counting objects: 100% (1736/1736), done.
remote: Compressing objects: 100% (511/511), done.
remote: Total 1736 (delta 1202), reused 1719 (delta 1193), pack-reused 0
Receiving objects: 100% (1736/1736), 5.48 MiB | 6.79 MiB/s, done.
Resolving deltas: 100% (1202/1202), done.
Downloading static/assets/webfont.woff (14 KB)
Error downloading object: static/assets/webfont.woff (7d3a21b): Smudge error: Error downloading static/assets/webfont.woff (7d3a21b4869056b06276f51018070848c876d86570c56f9fdf726d8fed53ae9d): [7d3a21b4869056b06276f51018070848c876d86570c56f9fdf726d8fed53ae9d] Object does not exist on the server: [404] Object does not exist on the server

You could try to restore from git but then you’d get the error:

git restore --source=HEAD :/
Downloading static/assets/webfont.woff (14 KB)
Error downloading object: static/assets/webfont.woff (7d3a21b): Smudge error: Error downloading static/assets/webfont.woff (7d3a21b4869056b06276f51018070848c876d86570c56f9fdf726d8fed53ae9d): [7d3a21b4869056b06276f51018070848c876d86570c56f9fdf726d8fed53ae9d] Object does not exist on the server: [404] Object does not exist on the server

Errors logged to ~/Source/repo/.git/lfs/logs/20210223T220123.881257.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: static/assets/webfont.woff: smudge filter lfs failed

OK, I’ll stop talking about all the possible errors. Hopefully by now you’ve picked up on what the solution is. Push the files using git lfs to the new repo. How does one do that?

git lfs push --all git@github.com:user/repo.git

This was done in the original repo where I modified the .git/config file to point to the new origin.

There you have it, all that exposition for a one line solution. Hopefully, the long explanations help you (and future me) understand the problem and make it clear why the solution is as simple as it is. It took me a while to get to that point, but now I have a better understanding of what git lfs does, and more importantly, what I should (not) do when migrating future git repos.

So here’s the right way to migrate git repos with lfs files in 2021.

git push --mirror git@github.com:user/repo.git
git lfs push --all git@github.com:user/repo.git

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 git@bitbucket.org:[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?

Vadim Kotov's user avatar

Vadim Kotov

7,9548 gold badges48 silver badges62 bronze badges

asked Oct 2, 2017 at 7:26

Dan-Dev's user avatar

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.

ian's user avatar

ian

11.8k9 gold badges48 silver badges106 bronze badges

answered Oct 2, 2017 at 9:54

Dan-Dev's user avatar

Dan-DevDan-Dev

8,6623 gold badges41 silver badges53 bronze badges

3

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.

answered Jan 30, 2019 at 4:45

Danger's user avatar

DangerDanger

2112 silver badges3 bronze badges

6

Skip to content



Open


Issue created Feb 17, 2016 by Brian Marshall@bmarshall

‘Error downloading object’ with git-lfs 1.1.1

Gitlab CE 8.4.3
git-lfs 1.1.1

When cloning a repo using git-lfs version 1.1.1 I get an error downloading files:

git clone git@HOST:GROUP/pbuilder-tarballs.git
Cloning into 'pbuilder-tarballs'...
remote: Counting objects: 30, done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 30 (delta 6), reused 0 (delta 0)
Receiving objects: 100% (30/30), 4.98 KiB | 0 bytes/s, done.
Resolving deltas: 100% (6/6), done.
Checking connectivity... done.
Downloading jessie.tgz (202.25 MB)
Error downloading object: jessie.tgz (20d81d611aa90e31bcdc0f77a9767588fb192216912fe1a9ab3b100b8501b803)

Errors logged to /tmp/pbuilder-tarballs/.git/lfs/objects/logs/20160217T141447.402572534.log
Use `git lfs logs last` to view the log.
error: external filter git-lfs smudge %f failed 2
error: external filter git-lfs smudge %f failed
fatal: jessie.tgz: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'

The git lfs logs say:

git-lfs/1.1.1 (GitHub; darwin amd64; go 1.5.3)
git version 2.7.1

$ git-lfs smudge jessie.tgz
Error downloading object: jessie.tgz (20d81d611aa90e31bcdc0f77a9767588fb192216912fe1a9ab3b100b8501b803)

exit status 1
goroutine 1 [running]:
github.com/github/git-lfs/lfs.Stack(0x0, 0x0, 0x0)
        /private/tmp/git-lfs20160205-83071-1xrm8js/git-lfs-1.1.1/src/github.com/github/git-lfs/lfs/errors.go:557 +0x80
github.com/github/git-lfs/commands.logPanicToWriter(0x89d1e8, 0xc820126008, 0xda0290, 0xc8201240f0)
        /private/tmp/git-lfs20160205-83071-1xrm8js/git-lfs-1.1.1/src/github.com/github/git-lfs/commands/commands.go:184 +0xf7f
github.com/github/git-lfs/commands.logPanic(0xda0290, 0xc8201240f0, 0x0, 0x0)
        /private/tmp/git-lfs20160205-83071-1xrm8js/git-lfs-1.1.1/src/github.com/github/git-lfs/commands/commands.go:148 +0x421
github.com/github/git-lfs/commands.handlePanic(0xda0290, 0xc8201240f0, 0x0, 0x0)
        /private/tmp/git-lfs20160205-83071-1xrm8js/git-lfs-1.1.1/src/github.com/github/git-lfs/commands/commands.go:123 +0x4e
github.com/github/git-lfs/commands.LoggedError(0xda0290, 0xc8201240f0, 0x56b4a0, 0x21, 0xc820117c98, 0x2, 0x2)
        /private/tmp/git-lfs20160205-83071-1xrm8js/git-lfs-1.1.1/src/github.com/github/git-lfs/commands/commands.go:73 +0x82
github.com/github/git-lfs/commands.smudgeCommand(0x760060, 0xc820011b90, 0x1, 0x1)
        /private/tmp/git-lfs20160205-83071-1xrm8js/git-lfs-1.1.1/src/github.com/github/git-lfs/commands/command_smudge.go:77 +0xd89
github.com/github/git-lfs/vendor/_nuts/github.com/spf13/cobra.(*Command).execute(0x760060, 0xc820011ae0, 0x1, 0x1, 0x0, 0x0)
        /private/tmp/git-lfs20160205-83071-1xrm8js/git-lfs-1.1.1/src/github.com/github/git-lfs/vendor/_nuts/github.com/spf13/cobra/command.go:477 +0x403
github.com/github/git-lfs/vendor/_nuts/github.com/spf13/cobra.(*Command).Execute(0x7610a0, 0x0, 0x0)
        /private/tmp/git-lfs20160205-83071-1xrm8js/git-lfs-1.1.1/src/github.com/github/git-lfs/vendor/_nuts/github.com/spf13/cobra/command.go:551 +0x46a
github.com/github/git-lfs/commands.Run()
        /private/tmp/git-lfs20160205-83071-1xrm8js/git-lfs-1.1.1/src/github.com/github/git-lfs/commands/commands.go:88 +0x23
main.main()
        /private/tmp/git-lfs20160205-83071-1xrm8js/git-lfs-1.1.1/git-lfs.go:34 +0x12e

ENV:
LocalWorkingDir=/tmp/pbuilder-tarballs
LocalGitDir=/tmp/pbuilder-tarballs/.git
LocalGitStorageDir=/tmp/pbuilder-tarballs/.git
LocalMediaDir=/tmp/pbuilder-tarballs/.git/lfs/objects
TempDir=/tmp/pbuilder-tarballs/.git/lfs/tmp
ConcurrentTransfers=3
BatchTransfer=true
GIT_DIR=.git

I’m using git-lfs from homebrew, but I get the same error with git-lfs 1.1.1 from Ubuntu

Downgrading to git-lfs 1.1.0 allows me to clone the repo.

Edited Jan 05, 2023 by 🤖 GitLab Bot 🤖

  • Remove From My Forums
  • Question

  • Hi,

    I have a repo on GitHub Enterprise that is using Git LFS to store large files. I can clone the repo with Source Tree and also using command line commands successfully. But when I clone the repo using VS2017 I keep getting errors (See below). It is unable
    to download the LFS files. I have installed Git-LFS client that is listed here https://git-lfs.github.com/.

    Any help here is much appreciated.

    Error: external filter ‘git-lfs filter-process’ failed
    Error encountered while cloning the remote repository: Git failed with a fatal error.
    fatal: <filepath>.xlsx: smudge filter lfs failed
    warning: Clone succeeded, but checkout failed.
    You can inspect what was checked out with ‘git status’
    and retry the checkout with ‘git checkout -f HEAD’

    Thanks!

Answers

  • Thank you for your response!

    This seems to be an issue with git lfs authentication. Credentials for lfs are not found, when I clone from Visual Studio. I fixed it by using oauth token in the repo url when cloning in Visual Studio.  I’ll post it on Stack Overflow for checking if
    there is a better way to save lfs credentials.

    ErrorLog:

    git-lfs/2.3.0 (GitHub; windows amd64; go 1.8.3; git 4dd2bf73)
    git version 2.12.2.windows.3

    $ git-lfs.exe filter-process
    Error downloading object: xxxxxxxx.xlsx (823c329): Smudge error: Error downloa
    xxxxxxxx.xlsx (823c329ce2d8dfe46f2c03beed53cfd80fc52dab399965e09379ea5f0435e1a8): batch
     credentials for https://github.xxxxx.com/xxxx/myrepo.git/info/lfs not found:
    exec: «askpass»: executable file not found in %PATH%

    Git credentials for https://github.xxxxx.com/xxxx/myrepo.git/info/lfs not found:
    exec: «askpass»: executable file not found in %PATH%
    github.com/git-lfs/git-lfs/errors.New
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/errors/errors.go:62
    github.com/git-lfs/git-lfs/lfsapi.getGitCreds
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/lfsapi/auth.go:156
    github.com/git-lfs/git-lfs/lfsapi.fillGitCreds
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/lfsapi/auth.go:163
    github.com/git-lfs/git-lfs/lfsapi.getCreds
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/lfsapi/auth.go:116
    github.com/git-lfs/git-lfs/lfsapi.(*Client).DoWithAuth
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/lfsapi/auth.go:39
    github.com/git-lfs/git-lfs/lfsapi.(*Client).DoWithAuth
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/lfsapi/auth.go:58
    github.com/git-lfs/git-lfs/tq.(*tqClient).Batch
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/tq/api.go:61
    github.com/git-lfs/git-lfs/tq.Batch
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/tq/api.go:37
    github.com/git-lfs/git-lfs/tq.(*TransferQueue).enqueueAndCollectRetriesFor
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/tq/transfer_queue.go:426
    github.com/git-lfs/git-lfs/tq.(*TransferQueue).collectBatches.func1
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/tq/transfer_queue.go:348
    runtime.goexit
            C:/Go/src/runtime/asm_amd64.s:2197
    batch response
    github.com/git-lfs/git-lfs/errors.newWrappedError
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/errors/types.go:170
    github.com/git-lfs/git-lfs/errors.Wrap
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/errors/errors.go:74
    github.com/git-lfs/git-lfs/tq.(*tqClient).Batch
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/tq/api.go:64
    github.com/git-lfs/git-lfs/tq.Batch
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/tq/api.go:37
    github.com/git-lfs/git-lfs/tq.(*TransferQueue).enqueueAndCollectRetriesFor
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/tq/transfer_queue.go:426
    github.com/git-lfs/git-lfs/tq.(*TransferQueue).collectBatches.func1
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/tq/transfer_queue.go:348
    runtime.goexit
            C:/Go/src/runtime/asm_amd64.s:2197
    Error downloading xxxxxxxxxxxx.xlsx (823c329ce2d8dfe46f2c03beed53cfd80fc52dab39996
    5e1a8)
    github.com/git-lfs/git-lfs/errors.newWrappedError
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/errors/types.go:170
    github.com/git-lfs/git-lfs/errors.Wrapf
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/errors/errors.go:85
    github.com/git-lfs/git-lfs/lfs.downloadFile
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/lfs/pointer_smudge.go:96
    github.com/git-lfs/git-lfs/lfs.PointerSmudge
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/lfs/pointer_smudge.go:61
    github.com/git-lfs/git-lfs/lfs.(*Pointer).Smudge
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/lfs/pointer.go:64
    github.com/git-lfs/git-lfs/commands.smudge
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/commands/command_smudge.go:128
    github.com/git-lfs/git-lfs/commands.filterCommand
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/commands/command_filter_process.go:112
    github.com/git-lfs/git-lfs/vendor/github.com/spf13/cobra.(*Command).execute
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/vendor/github.com/spf13/cobra/command.go:477
    github.com/git-lfs/git-lfs/vendor/github.com/spf13/cobra.(*Command).Execute
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/vendor/github.com/spf13/cobra/command.go:551
    github.com/git-lfs/git-lfs/commands.Run
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/commands/run.go:68
    main.main
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/git-lfs.go:35
    runtime.main
            C:/Go/src/runtime/proc.go:185
    runtime.goexit
            C:/Go/src/runtime/asm_amd64.s:2197
    Smudge error
    github.com/git-lfs/git-lfs/errors.newWrappedError
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/errors/types.go:170
    github.com/git-lfs/git-lfs/errors.NewSmudgeError
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/errors/types.go:256
    github.com/git-lfs/git-lfs/lfs.PointerSmudge
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/lfs/pointer_smudge.go:70
    github.com/git-lfs/git-lfs/lfs.(*Pointer).Smudge
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/lfs/pointer.go:64
    github.com/git-lfs/git-lfs/commands.smudge
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/commands/command_smudge.go:128
    github.com/git-lfs/git-lfs/commands.filterCommand
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/commands/command_filter_process.go:112
    github.com/git-lfs/git-lfs/vendor/github.com/spf13/cobra.(*Command).execute
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/vendor/github.com/spf13/cobra/command.go:477
    github.com/git-lfs/git-lfs/vendor/github.com/spf13/cobra.(*Command).Execute
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/vendor/github.com/spf13/cobra/command.go:551
    github.com/git-lfs/git-lfs/commands.Run
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/commands/run.go:68
    main.main
            C:/Users/techn/go/src/github.com/git-lfs/git-lfs/git-lfs.go:35
    runtime.main
            C:/Go/src/runtime/proc.go:185
    runtime.goexit
            C:/Go/src/runtime/asm_amd64.s:2197

    Current time in UTC:
    2017-09-22 03:50:41

    ENV:
    LocalWorkingDir=C:Users<XXXX>SourceReposmyrepo
    LocalGitDir=C:Users<XXXX>SourceReposmyrepo.git
    LocalGitStorageDir=C:Users<XXXX>SourceReposmyrepo.git
    LocalMediaDir=C:Users<XXXX>SourceReposmyrepo.gitlfsobjects
    LocalReferenceDir=
    TempDir=C:Users<XXXX>SourceReposmyrepo.gitlfstmp
    ConcurrentTransfers=3
    TusTransfers=false
    BasicTransfersOnly=false
    SkipDownloadErrors=false
    FetchRecentAlways=false
    FetchRecentRefsDays=7
    FetchRecentCommitsDays=0
    FetchRecentRefsIncludeRemotes=true
    PruneOffsetDays=3
    PruneVerifyRemoteAlways=false
    PruneRemoteName=origin
    LfsStorageDir=C:Users<XXXX>SourceReposmyrepo.gitlfs
    AccessDownload=none
    AccessUpload=none
    DownloadTransfers=basic
    UploadTransfers=basic
    GIT_ASKPASS=askpass
    GIT_CEILING_DIRECTORIES=C:Users<XXXX>SourceRepos
    GIT_CONFIG_PARAMETERS=’gc.auto=0′ ‘credential.helper=manager’ ‘core.askpass=askpass’ ‘http.extraheader=X-TFS-NoLogo: VS15/15.0.0’
    GIT_DIR=.git
    GIT_EXEC_PATH=C:Program Files (x86)Microsoft Visual Studio2017EnterpriseCommon7IDECommonExtensionsMicrosoftTeamFoundationTeam ExplorerGitmingw32l
    e
    GIT_FLUSH=1
    GIT_HTTP_USER_AGENT=git/2.12.2 (Microsoft Windows NT 10.0.15063.0; Win32NT x64) CLR/4.0.30319 VS15/15.0.0
    GIT_LFS_PATH=C:Program FilesGit LFS
    GIT_MERGE_VERBOSITY=4
    GIT_PAGER=cat
    GIT_TERMINAL_PROMPT=0

    • Edited by

      Friday, September 22, 2017 12:27 PM

    • Marked as answer by
      sramshetty
      Friday, September 22, 2017 12:27 PM

October 4, 2019


3-minute read

tl;dr; Set a Global Environment Variable GIT_LFS_SKIP_SMUDGE=1 to fix the issue.

Recently we encountered issues with our Jenkins CI setup at Blendle with Git repositories which
contain Git LFS files. The behavior of the normal workspace checkout of Jenkins has
changed without any apparent reason. No plugins are updated nor did Jenkins itself receive an upgrade, we know
this for sure because we have codified our CI setup and plugins using the
Configuration as Code.

This is error we received

Cloning the remote Git repository
Cloning with configured refspecs honoured and without tags
Cloning repository https://github.com/blendle/repo_with_lfs_files.git
 > git init /home/jenkins/agent/workspace/test # timeout=10
Fetching upstream changes from https://github.com/blendle/repo_with_lfs_files.git
 > git --version # timeout=10
using GIT_ASKPASS to set credentials GitHub Username & Password
 > git fetch --no-tags --force --progress -- https://github.com/blendle/repo_with_lfs_files.git +refs/heads/test:refs/remotes/origin/test
Fetching without tags
Pruning obsolete local branches
Checking out Revision 7888fec2200a056b081a077d0ec5c3023b18c70f (test)
 > git config remote.origin.url https://github.com/blendle/repo_with_lfs_files.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/test:refs/remotes/origin/test # timeout=10
 > git config remote.origin.url https://github.com/blendle/repo_with_lfs_files.git # timeout=10
Fetching upstream changes from https://github.com/blendle/repo_with_lfs_files.git
using GIT_ASKPASS to set credentials GitHub Username & Password
 > git fetch --no-tags --force --progress --prune -- https://github.com/blendle/repo_with_lfs_files.git +refs/heads/test:refs/remotes/origin/test
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 7888fec2200a056b081a077d0ec5c3023b18c70f

captured job exception: [class: class hudson.plugins.git.GitException] [message: Could not checkout 7888fec2200a056b081a077d0ec5c3023b18c70f]
exception has cause: [class: class hudson.plugins.git.GitException] [message: Command "git checkout -f 7888fec2200a056b081a077d0ec5c3023b18c70f" returned status code 128:
stderr: Downloading lfs_file_object (3.6 MB)
Error downloading object: lfs_file_object (46bc159): Smudge error: Error downloading lfs_file_object (46bc159dd84a8b99d14d65fcd66af5f13220b19ef8f74fd9656a32cc47a0ab3b): batch response: Bad credentials

Errors logged to /home/jenkins/agent/workspace/test.git/lfs/logs/20190930T051331.0177141.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: lfs_file_object: smudge filter lfs failed

hudson.plugins.git.GitException: Command "git checkout -f 7888fec2200a056b081a077d0ec5c3023b18c70f" returned status code 128:
stdout: 
stderr: Downloading lfs_file_object (3.6 MB)
Error downloading object: lfs_file_object (46bc159): Smudge error: Error downloading lfs_file_object (46bc159dd84a8b99d14d65fcd66af5f13220b19ef8f74fd9656a32cc47a0ab3b): batch response: Bad credentials

Errors logged to /home/jenkins/agent/workspace/test.git/lfs/logs/20190930T051331.0177141.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: lfs_file_object: smudge filter lfs failed

	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2172)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$1000(CliGitAPIImpl.java:78)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:2471)
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from 10.0.1.19/10.0.1.19:36878
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
		at hudson.remoting.Channel.call(Channel.java:957)
		at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
		at sun.reflect.GeneratedMethodAccessor458.invoke(Unknown Source)
		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.lang.reflect.Method.invoke(Method.java:498)
		at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
		at com.sun.proxy.$Proxy116.execute(Unknown Source)
		at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1242)
		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:124)
		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
Caused: hudson.plugins.git.GitException: Could not checkout 7888fec2200a056b081a077d0ec5c3023b18c70f
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:2495)
	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:369)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:97)
	at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE

On several issues, we could find on Jenkins and Git LFS, it was recommended to
install git-lfs both on the Jenkins Master and the clients, so we did but without any luck. Strange part was we couldn’t duplicate the
behavior if we executed the same steps in a client pod as Jenkins.

Since we aren’t interested in pulling the Git LFS files during the initial checkout, we’ve disabled it by using a
global environment variable which we expose during the whole pipeline step:

Example of the configured environment variable settings in Jenkins

Configure Global Environment Variable

After this change, our pipelines are running again without any issues, since the Git LFS files are checked out if needed
in any further steps of the pipeline like it was already the case before.

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Git fatal unable to access the requested url returned error 403
  • Git failed with a fatal error unable to access error setting certificate verify locations
  • Git failed with a fatal error repository not found
  • Git error unable to write file
  • Git error unable to create file

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии