You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

工具升级后Yocto集成Git LFS失效,无法拉取大文件

Yocto与Git LFS集成拉取大文件失败问题

环境版本信息

  • Yocto kirkstone
  • GitLab 16.7.3 及 16.8
  • Git 版本 2.34.1
  • Git LFS 3.0.2 (GitHub; linux amd64; go 1.18.1)
  • Kubuntu 22.04 系统:Linux linux-dev 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

问题现象

执行Yocto构建命令 bitbake tep2020ihm 时,触发多个Git LFS Smudge错误,示例错误信息如下:

ERROR: tep2020ihm-1.22-r0 do_unpack: Bitbake Fetcher Error: FetchError( <...>) failed with exit code 128, output:
Downloading 3rd-party/aghaf/lib/aghaf.dll (6.6 MB)
Error downloading object: 3rd-party/aghaf/lib/aghaf.dll (1d6198d): Smudge error: Error downloading 3rd-party/aghaf/lib/aghaf.dll

在开发服务器其他目录手动执行 git clone https://... 克隆项目时,可正常拉取包括大文件在内的所有内容,但Yocto的fetcher组件执行拉取操作时,会出现大文件的Smudge错误。

若在项目Yocto配方.bb文件的SRC_URI变量中添加 lfs=0 参数,fetcher可正常完成拉取,但获取到的是Git LFS占位文件而非实际文件内容,占位文件示例内容如下:

version https://git-lfs.github.com/spec/v1
oid sha256:dba4dab327a3b420509ac9f466acde6c657698ccb1854522d20d3cfb35a493c1
size 173735936

Git LFS错误日志详情

执行 git lfs logs last 查看最近日志,错误原因显示为域名解析临时失败,具体日志内容如下:

git-lfs/3.0.2 (GitHub; linux amd64; go 1.18.1)
git version 2.34.1

$ git-lfs filter-process
Error downloading object: 3rd-party/aghaf/lib/aghaf.dll (1d6198d): Smudge error: Error downloading 3rd-party/aghaf/lib/aghaf.dll (1d6198d4a0a31d3425d50901619f3b223e15d8f328c5a554d6150a0cb00fb5fd): batch response: Post "https://jlsabatier:***@gitlab.annecyelectronique.com/annecyelectronique/pfd2020/tep2020_ihm.git/info/lfs/objects/batch": dial tcp: lookup gitlab.annecyelectronique.com: Temporary failure in name resolution
[重复错误日志省略]
[栈追踪及环境变量信息省略]

内容的提问来源于stack exchange,提问作者Jean-Loup Sabatier

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.01 20:01:16