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

问题描述 投票:6回答:1

我一直在使用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 '[email protected]: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安装。

我还能在这做什么?

git version-control gitlab atlassian-sourcetree git-lfs
1个回答
2
投票

检查这是否与gitlab-org/gitlab-ce issue 40616类似:

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

使用API​​禁用项目的LFS(我正在使用HTTPie)

http PUT https://gitlab.com/api/v4/projects/ name = lfs_enabled = false Private-Token:

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

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

推送到GitLab现在应该工作

© www.soinside.com 2019 - 2024. All rights reserved.