windows - undlader at klonre repository med git lfs

Indlæg af Hanne Mølgaard Plasc

Problem



Mit repo bruger git lfs. For en frisk klon løb jeg:


git lfs install
git clone https://example.com/repo.git


Klonen kommer til det punkt, hvor det begynder at downloade LFS-filer, kommer til en fil og fejler derefter. Filen, hvor den mislykkes, er forskellig hver gang jeg forsøger at klone. Meget lejlighedsvis lykkes det.


Her er output:


Cloning into 'repo'...
remote: Counting objects: 35699, done.
remote: Compressing objects: 100\% (17678/17678), done.
remote: Total 35699 (delta 15603), reused 35553 (delta 15545)
Receiving objects: 100\% (35699/35699), 231.45 MiB | 11.12 MiB/s, done.
Resolving deltas: 100\% (15603/15603), done.
Downloading big\_file.big (157.39 KB)
...
Downloading some\_other\_big\_file.big (18.84 KB)
Error downloading object: some\_other\_big\_file.big

Errors logged to blah.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: some\_other\_big\_file.big: 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'


LFS logs siger:


Error downloading object: some\_other\_big\_file.big

Smudge error: Error buffering media file: cannot write data to tempfile "blah.tmp": LFS: unexpected EOF:
github.com/git-lfs/git-lfs/errors.newWrappedError
        C:/Go/src/github.com/git-lfs/git-lfs/errors/types.go:166
github.com/git-lfs/git-lfs/errors.NewSmudgeError
        C:/Go/src/github.com/git-lfs/git-lfs/errors/types.go:252
github.com/git-lfs/git-lfs/lfs.PointerSmudge
        C:/Go/src/github.com/git-lfs/git-lfs/lfs/pointer\_smudge.go:70
github.com/git-lfs/git-lfs/lfs.(*Pointer).Smudge
        C:/Go/src/github.com/git-lfs/git-lfs/lfs/pointer.go:65
github.com/git-lfs/git-lfs/commands.smudge
        C:/Go/src/github.com/git-lfs/git-lfs/commands/command\_smudge.go:84
github.com/git-lfs/git-lfs/commands.filterCommand
        C:/Go/src/github.com/git-lfs/git-lfs/commands/command\_filter\_process.go:65
github.com/git-lfs/git-lfs/vendor/github.com/spf13/cobra.(*Command).execute
        C:/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:/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:/Go/src/github.com/git-lfs/git-lfs/commands/run.go:66
main.main
        C:/Go/src/github.com/git-lfs/git-lfs/git-lfs.go:33
runtime.main
        C:/Go/src/runtime/proc.go:183
runtime.goexit
        C:/Go/src/runtime/asm\_amd64.s:2086


Hvis jeg prøver git lfs pull på dette tidspunkt, fungerer det fint.


Enhver ide om, hvad der kunne forårsage denne manglende download af LFS-filer?

Bedste reference


Jeg havde det samme problem, og der var allerede en fejl rapporteret med git lfs. Mens fejlen blev løst, hjalp denne løsning med mig, hvor du hoppede over filteret, hvor det svigtede. [6]


// 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


Credits: @strich