我的回购使用git lfs。 对于一个新鲜的克隆,我跑了:
git lfs install git clone https://example.com/repo.git
克隆到达开始下载lfs文件的地步,到达某个文件然后失败。 每次尝试克隆时,失败的文件都是不同的。 非常偶然地成功。
这是输出:
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日志说:
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
如果我尝试git lfs pull
在这一点上,一切工作正常。
任何想法可能导致这种失败下载的lfs文件?
我有类似的问题,并已经有一个与git lfs报告的错误 。 在错误被解决的时候,这个解决方法帮助我,在那里你跳过了失败的过滤器。
// 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
积分:@strich
有些事情要检查:
1)你检查了临时文件的磁盘空间量吗? 像/ tmp一样,如果你正在使用一些Linux机器(我想你使用的是Windows,对吗?)。
2)你有没有尝试过使用“git lfs clone …”而不是“git clone …”?