Gitlab 安装gitlab-runner踩坑记录

Gitlab Ci 踩坑记录

一、centos7搭建gitlab -runner

1、搭建gitlab-runner

1.1 添加gitlab-runner仓库地址

curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | sudo bash

1.2 安装gitlab-runner

sudo yum install gitlab-runner

2 遇到的bug

2.1 错误

在centos7上搭建 gitlab-runner 后,二次 构建项目 报错

Running with gitlab-runner 13.10.0 (54944146)
  on gjkj 3azXyAP9
Preparing the "shell" executor
00:00
Using Shell executor...
Preparing environment
00:00
Running on gjkj...
Getting source from Git repository
00:02
Fetching changes with git depth set to 50...
################################################
Reinitialized existing Git repository in /home/gitlab-runner/builds/3azXyAP9/0/lurious/newer/.git/
fatal: git fetch-pack: expected shallow list
fatal: The remote end hung up unexpectedly
##############################################
Cleaning up file based variables
00:00
ERROR: Job failed: exit status 1
2.2 原因

git的版本太低了,不支持最新的API

2.3 解决方案

参考 [https://www.jianshu.com/p/30b6771178cf]

升级git

#安装源
yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm
#安装git
yum install git
#更新git
yum update git
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值