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

拉取Git LFS文件时git pull失败:授权与Smudge Filter错误

公开Git仓库拉取时Git LFS授权与Smudge Filter错误排查

问题详情

从公开Git仓库执行git pull时,拉取Git LFS托管的big_binary_file.h5文件过程中触发授权错误与Smudge Filter错误,其他普通文件可正常拉取。

仓库结构

folder
folder
.gitattributes
python file
big_binary_file.h5

报错信息

Downloading big_binary_file.h5 (262 MB)
Error downloading object: big_binary_file.h5: Smudge error: Error downloading big_binary_file.h5:
batch response: Authorization error: https://github.com/user/repo.git/objects/batch
Check that you have proper access to the repository

Errors logged to log_path/log.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: big_binary_file.h5: smudge filter lfs failed

.gitattributes配置

*.h5 filter=lfs diff=lfs merge=lfs -text

疑问

公开仓库的Git LFS文件应该无需特殊授权,且其他文件可正常拉取,为何会出现授权错误?

已尝试的解决方法

  • 参考相关Stack Overflow问题的解决方案
  • 确认lfs.url与remote.origin.url一致
  • 检查git credentials配置是否正确
  • 验证仓库为公开可见且.gitattributes配置无误
  • 确认本地已安装git lfs且可推送至该仓库
  • 使用git lfs logs last进行诊断
  • 执行git reset后重新拉取

可能的问题原因与额外排查方向

  • Git LFS URL协议混用:若仓库origin用SSH协议,但LFS配置仍用HTTPS,公开仓库HTTPS拉取LFS可能触发不必要的凭证校验。尝试将LFS URL改为SSH格式,执行命令:git config lfs.url ssh://git@github.com/user/repo.git
  • 本地凭证缓存干扰:旧的错误凭证可能被Git缓存,即使仓库公开也会触发校验。执行git credential reject并输入对应域名信息清除缓存,再重新拉取
  • Git LFS版本问题:旧版本Git LFS对公开仓库LFS对象的拉取逻辑存在bug,升级至最新版本后重试
  • LFS对象权限异常:仓库虽公开,但单个LFS对象可能被设置为私有(上传时的误操作),联系仓库所有者确认LFS对象的可见性

内容的提问来源于stack exchange,提问作者Forrest Goryl

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.19 16:05:20