我已经使用 Git LFS for GitLab 几个月了,没有任何问题,但最近在推送文件时返回了以下错误:
$ git push origin master
Git LFS: (14 of 14 files) 8.88 MB / 8.88 MB
Counting objects: 54, done.
Delta compression using up to 6 threads.
Compressing objects: 100% (49/49), done.
Writing objects: 100% (54/54), 5.42 KiB | 0 bytes/s, done.
Total 54 (delta 15), reused 0 (delta 0)
remote: GitLab: LFS objects are missing. Ensure LFS is properly set up or try a manual "git lfs push --all".
To https://gitlab.com/<gitURL>.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://gitlab.com/<gitURL>.git'
where gitURL
是我的 git 存储库 URL。
正如错误所示,我尝试使用手动推送我的二进制文件git lfs push --all
,这给了我以下输出:
$ git lfs push --all origin master
Git LFS: (0 of 0 files, 1370 skipped) 0 B / 0 B, 1.77 GB skipped
据我了解,这意味着我的所有本地文件都已成功存储在我的服务器上。
尝试获取所有 lfs 文件也能正常工作:
$ git lfs fetch --all
Scanning for all objects ever referenced...
* 1446 objects found
Fetching objects...
完成后没有任何错误。
此外,使用以下命令检查所有 lfs 文件的一致性git lfs fsck
似乎也工作得很好:
$ git lfs fsck
Git LFS fsck OK
我现在开始没有解决这个错误的想法了。
任何帮助将不胜感激。