小编Sc4*_*c4v的帖子

Git LFS 不尊重 credential.helper 的配置文件级别

运行 Git LFS 命令,例如

GIT_TRACE=1 git lfs locks
Run Code Online (Sandbox Code Playgroud)

显示系统 credential.helper 已被使用,即使它被本地配置覆盖。

跑步

git config --system -l
Run Code Online (Sandbox Code Playgroud)

列出“credential.helper=manager”

然而

git config --local -l
Run Code Online (Sandbox Code Playgroud)

列出 'credential.helper=other'

在启用跟踪器的情况下运行 Git LFS locks 命令会显示此行

run-command.c:663       trace: run_command: 'git credential-manager get'
Run Code Online (Sandbox Code Playgroud)

删除系统范围管理器

git config --system --unset credential.helper
Run Code Online (Sandbox Code Playgroud)

修复了问题,并且我的本地助手“其他”已正确使用。根据git 配置文档,每个级别都优于前一个级别,因此 Git LFS 不遵守 git 标准。有没有什么聪明的方法可以在不取消系统范围帮助程序的情况下完成这项工作,并且可能会破坏其他存储库的身份验证?

windows git git-lfs git-credential-manager

5
推荐指数
1
解决办法
933
查看次数

标签 统计

git ×1

git-credential-manager ×1

git-lfs ×1

windows ×1