LFS导致GitLab: Push operation timed out
问题
push aosp(单独一个git):
$ git push origin XXXX:XXXX
Counting objects: 1468867, done.
Delta compression using up to 24 threads.
Compressing objects: 100% (768892/768892), done.
Writing objects: 100% (1468867/1468867), 29.98 GiB | 24.27 MiB/s, done.
Total 1468867 (delta 543242), reused 1467377 (delta 542008)
remote: Resolving deltas: 100% (543242/543242), done.
remote: Checking connectivity: 1468867, done.
remote: GitLab: Push operation timed out
remote:
remote: Timing information for debugging purposes:
remote: Running checks for ref: XXXX
remote: Checking if you are allowed to push... (5.56ms)
remote: Checking if default branch is being deleted... (0.04ms)
remote: Checking if you are force pushing to a protected branch... (61.78ms)
remote: Checking if you are allowed to push to the protected branch... (19.29ms)
remote: Scanning repository for blobs stored in LFS and verifying their files have been uploaded to GitLab... (cancelled after 29964.17ms)
remote: Running checks for 1 changes (cancelled after 29964.72ms)
To ssh://192.168.1.226:41022/....
! [remote rejected] XXXX -> XXXX (pre-receive hook declined)
error: failed to push some refs to 'ssh://git@192.168.1.226:41022/....'
分析
这里:
remote: Checking if you are allowed to push... (5.56ms)
remote: Checking if default branch is being deleted... (0.04ms)
remote: Checking if you are force pushing to a protected branch... (61.78ms)
remote: Checking if you are allowed to push to the protected branch... (19.29ms)
remote: Scanning repository for blobs stored in LFS and verifying their files have been uploaded to GitLab... (cancelled after 29964.17ms)
Checking这几个都是没问题的,停在 Scanning .... ,lfs这里,其实就是这里的问题。
网上的答案
网上的答案参考:https://blog.csdn.net/yyzsyx/article/details/125904973 和 https://stackoverflow.com/questions/67265757/getting-a-timeout-pushing-a-repository-to-local-gitlab
但是我没有gitlab服务器的权限,所以不适用。
最终解决办法
找到仓库Settings中有lfs的开关
入口路径:Settings - General - Visibility, project features, permissions 打开 Expand 开关
如图这里关了就OK了
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架