GitLab: Push operation timed out

本文涉及的产品
图片翻译,图片翻译 100张
语种识别,语种识别 100万字符
文档翻译,文档翻译 1千页
简介: 本文描述了在推送AOSP源码到GitLab时遇到的超时问题,并提供了通过在GitLab服务器上禁用LFS检查功能来解决这个问题的方法。

1.问题描述

建立新AOSP仓库之后,推送AOSP源码,始终提示 GitLab: Push operation timed out 错误,没法把源码推上去。

2.日志及流程

  • 从下面操作日志可知,和lfs有关系
  • in LFS cancelled
szhou@bc04:~/mt/main/aosp$ git push origin  master
枚举对象中: 926922, 完成.
对象计数中: 100% (926922/926922), 完成.
使用 64 个线程进行压缩
压缩对象中: 100% (538300/538300), 完成.
写入对象中: 100% (926922/926922), 19.96 GiB | 2.25 MiB/s, 完成.
总共 926922(差异 294898),复用 925791(差异 293788),包复用 0
remote: Resolving deltas: 100% (294898/294898), done.
remote: Checking connectivity: 926922, done.
remote: GitLab: Push operation timed out
remote:
remote: Timing information for debugging purposes:
remote: Running checks for ref: master
remote: Checking if you are allowed to push... (37.1ms)
remote: Checking if default branch is being deleted... (0.02ms)
remote: Checking if you are force pushing to a protected branch... (41.29ms)
remote: Checking if you are allowed to push to the protected branch... (47.86ms)
remote: Scanning repository for blobs stored in LFS and verifying their files have been uploaded to GitLab... (cancelled after 29071.32ms)
remote: Running checks for 1 changes (cancelled after 29071.46ms)
To https://60.190.224.xx:xxxx/android/aosp.git
 ! [remote rejected]       master -> master (pre-receive hook declined)
error: 推送一些引用到 'https://60.190.224.xx:xxxx/android/aosp.git' 失败
szhou@bc04:~/mt/main/aosp$

3.解决办法

  • 进入gitlab服务器
  • 输入如下命令:
  • irb(main):003:0> Feature.disable(:lfs_check)
  • 即关闭lfs check, 规避此问题
szhou@Android-Gitlab:~$ sudo gitlab-rails console
[sudo] szhou 的密码: 
--------------------------------------------------------------------------------
 Ruby:         ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]
 GitLab:       14.6.3-ee (6360adc49de) EE
 GitLab Shell: 13.22.1
 PostgreSQL:   12.7
--------------------------------------------------------------------------------
Loading production environment (Rails 6.1.4.1)
irb(main):003:0> Feature.disable(:lfs_check)
=> true

4.测试结果

szhou@bc04:~/mt/main/aosp$ git push origin  master
枚举对象中: 926922, 完成.
对象计数中: 100% (926922/926922), 完成.
使用 64 个线程进行压缩
压缩对象中: 100% (538300/538300), 完成.
写入对象中: 100% (926922/926922), 19.96 GiB | 2.29 MiB/s, 完成.
总共 926922(差异 294902),复用 925787(差异 293788),包复用 0
remote: Resolving deltas: 100% (294902/294902), done.
remote: Checking connectivity: 926922, done.
To https://60.190.224.xxx:5757/android/aosp.git
 * [new branch]            master -> master
szhou@bc04:~/mt/main/aosp$
相关文章
|
开发工具 git
Gitlab提交代码:You are not allowed to push code to this project.fatal: unable to access requested URL
Gitlab提交代码:You are not allowed to push code to this project.fatal: unable to access requested URL
833 0
|
jenkins 持续交付 应用服务中间件
|
开发工具 git
自搭gitlab报错--git operation was rejected by pre-receive hook
自己编译gitlab源码搭建中文版gitlab完成后突然无法提交,gitlab服务使用正常,可是新建库文件,gitclone的时候报错。用gitlab本身也报错。 报错git operation was rejected by pre-receive hook 无意间找到一个检测gitl...
2329 0
|
4月前
|
Linux 应用服务中间件 网络安全
linux安装Gitlab
linux安装Gitlab
145 0
|
16天前
|
Shell Docker 容器
GitlabCI学习笔记之一:安装Gitlab和GitLabRunner
GitlabCI学习笔记之一:安装Gitlab和GitLabRunner
|
13天前
|
Docker 容器
Docker安装Gitlab和Gitlab-Runner并实现项目CICD
Docker安装Gitlab和Gitlab-Runner并实现项目CICD
|
2月前
|
Devops 持续交付 开发工具
入职必会-开发环境搭建54-GitLab下载和安装
GitLab 是一个基于 web 的 Git 仓库管理工具,提供了代码托管、版本控制、协作开发、持续集成等功能,是一个综合的 DevOps 平台。用户可以使用 GitLab 托管他们的代码仓库,并利用其丰富的功能来管理和协作开发项目。 以下是 GitLab 的一些主要特点和功能。
入职必会-开发环境搭建54-GitLab下载和安装
|
30天前
|
Ubuntu 安全 网络安全
在Ubuntu 16.04上安装和配置GitLab的方法
在Ubuntu 16.04上安装和配置GitLab的方法
44 0
|
30天前
|
存储 Ubuntu 安全
在Ubuntu 18.04上安装和配置GitLab的方法
在Ubuntu 18.04上安装和配置GitLab的方法
29 0

相关实验场景

更多