我已经使用Git LFS在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'
其中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...
这个操作完成时没有出现任何错误。
此外,使用git lfs fsck
检查所有的lfs文件以确保一致性似乎也很顺利:
$ git lfs fsck
Git LFS fsck OK
我现在已经开始没有办法修复这个错误了。非常感谢任何帮助。