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

10

我一直在使用带有LFS的Gitlab,一直都很顺利,但今天不知怎么就遇到了这个问题:

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'
所以我按照他们的指示运行了 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)

看起来那个做了必要的事情,对吧?所以我尝试再次推送,但我仍然遇到了之前完全相同的问题。

我在我的网络服务器上运行自己的GitLab版本。

这里还能做些什么呢?


2
还尝试了 $ git lfs fsck,只是给了我 Git LFS fsck OK - Arvin
1个回答

2

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

I've verified that it is possible to push to GitLab if the LFS objects are stored elsewhere, but LFS must be disabled for the project so that the LFS validation is disabled.

Disabled LFS for the project using the API (I'm using HTTPie)

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

Add the lfs.url to the lfs config (for example GitHub)

git config -f .lfsconfig lfs.url https://github.com/<user>/<project>.git/info/lfs

Push to GitLab should now work


@mathtick 不太确定。 - VonC

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接