簡體   English   中英

無法使用 git lfs 克隆存儲庫

[英]Fail to clone repository with git lfs

我的倉庫使用 git lfs。 對於一個新的克隆,我跑了:

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

克隆到達開始下載 lfs 文件的地步,到達某個文件然后失敗。 每次我嘗試克隆時失敗的文件都是不同的。 偶爾它會成功。

這是 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 日志說:

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

嘗試從 GitBash 執行git lfs pull

看起來命令提示符沒有顯示密碼彈出窗口,這是git lfs工作所必需的。

Git 配置設置

git config --global http.sslVerify true

git config --global http.sslBackend schannel

這對我有用

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM