Git无法推送(LFS上传丢失的对象)

Arv*_*vin 6 git version-control gitlab atlassian-sourcetree git-lfs

我一直在使用Gitlab与LFS一段时间,但今天不知何故遇到了这个问题:

me@some-PC MINGW32 /b/Unity Projects/Platballer (master)
$ git push
LFS upload missing objects: (32/33), 30 MB | 0 B/s
Uploading LFS objects:  97% (32/33), 30 MB | 0 B/s, done
  (missing) Assets/External Assets/TimelineEvents/setup-guide.pdf (6ef8ef61e49821309de416925bf4e068ebb10a57f3398cb926e967eeb90cf034)
Counting objects: 401, done.
Delta compression using up to 16 threads.
Compressing objects: 100% (400/400), done.
Writing objects: 100% (401/401), 1.40 MiB | 9.56 MiB/s, done.
Total 401 (delta 177), reused 0 (delta 0)
remote: Resolving deltas: 100% (177/177), completed with 31 local objects.
remote: GitLab: LFS objects are missing. Ensure LFS is properly set up or try a manual "git lfs push --all".
To arvzrg.asuscomm.com:arvz/platballer.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@link.someurlcom:me/project.git'
Run Code Online (Sandbox Code Playgroud)

所以我做了他们所说的并运行了git lfs push --all origin master ,它给了我:

Uploading LFS objects: 100% (330/331), 52 MB | 0 B/s, done
LFS upload missing objects:
  (missing) Assets/External Assets/TimelineEvents/setup-guide.pdf (6ef8ef61e49821309de416925bf4e068ebb10a57f3398cb926e967eeb90cf034)
Run Code Online (Sandbox Code Playgroud)

看起来好像做了什么,做对了吗?所以我再次尝试推,但我仍然得到了我之前所做的完全相同的问题.

我在网络上的服务器上运行自己的GitLab安装.

我还能在这做什么?

Von*_*onC 2

检查这是否类似于gitlab-org/gitlab-ce 问题 40616

我已经验证,如果 LFS 对象存储在其他地方,则可以推送到 GitLab,但必须为项目禁用 LFS,以便禁用 LFS 验证。

使用 API 为项目禁用 LFS(我使用的是 HTTPie)

http PUT https://gitlab.com/api/v4/projects/<id> name=<project-name> lfs_enabled=false Private-Token:<your token>

添加lfs.url到 lfs 配置(例如 GitHub)

git config -f .lfsconfig lfs.url https://github.com/<user>/<project>.git/info/lfs
Run Code Online (Sandbox Code Playgroud)

推送到 GitLab 现在应该可以工作了