在进行https克隆时发生git-lfs-smutter错误



我遇到了一个问题,我自己托管的gitlab 13.9服务器上的某些项目可以用ssh克隆而不会出现任何问题。

但是如果我用https克隆,我会得到以下错误:

Error downloading object: <file> (353bfa2): Smudge error: Error downloading <file> (353bfa2b22928633c05343fb42365cf1d1fe55582392f5d8099be6eca9986c52): batch response: Repository or object not found: https://<user:token>@<url>/info/lfs/objects/batch
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: <file>: smudge filter lfs failed

我的lfs env是:

git-lfs/2.13.3 (GitHub; linux amd64; go 1.16.2)
git version 2.37.1
Endpoint=https://<user:token>@<url>.git/info/lfs (auth=none)
LocalWorkingDir=<path>
LocalGitDir=<path>/.git
LocalGitStorageDir=<path>/.git
LocalMediaDir=<path>/.git/lfs/objects
LocalReferenceDirs=
TempDir=<path>/.git/lfs/tmp
ConcurrentTransfers=8
TusTransfers=false
BasicTransfersOnly=false
SkipDownloadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneRemoteName=origin
LfsStorageDir=<path>/.git/lfs
AccessDownload=none
AccessUpload=none
DownloadTransfers=basic,lfs-standalone-file
UploadTransfers=basic,lfs-standalone-file
GIT_EXEC_PATH=/usr/lib/git-core
git config filter.lfs.process = "git-lfs filter-process"
git config filter.lfs.smudge = "git-lfs smudge -- %f"
git config filter.lfs.clean = "git-lfs clean -- %f"

我无法访问gitlab服务器配置,所以我不确定,但我知道同一服务器上的其他项目可以很好地使用ssh和https克隆。

该错误确实涉及HTTPS URL,这并不奇怪,因为Git LFS和GitLab提到:

当SSH被设置为远程时,Git LFS对象仍然通过HTTPS。

您可能希望自己托管的服务器上的GitLab管理员执行";上传文件的完整性";控制

至少是sudo gitlab-rake gitlab:lfs:check部分。

以及(对于同一管理员(在使用SSH与HTTPS进行克隆时检查日志,以了解差异。

最新更新