首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Shell执行器未能在Ubuntu20.04 Gitlab Runner中准备环境

Shell执行器未能在Ubuntu20.04 Gitlab Runner中准备环境
EN

Stack Overflow用户
提问于 2022-03-29 12:38:05
回答 1查看 771关注 0票数 0

摘要

代码语言:javascript
运行
复制
After updating our build system to Ubuntu 20.04, any job using the Shell executor fails:
Running with gitlab-runner 13.1.1 (6fbc7474)
  on [redacted]
Preparing the "shell" executor
00:00
Using Shell executor...
Preparing environment
00:00
Running on [redacted]...
ERROR: Job failed (system failure): prepare environment: exit status 1. Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information

当我们使用Ubuntu18.04提供一个runner实例时,Shell执行器将按预期工作。

复制的步骤

使用Ubuntu18.04提供一个新的runner实例,并将其注册为runner。它将成功运行Shell作业。使用Ubuntu20.04提供一个新的runner实例,遵循与前面完全相同的步骤,并将其注册为一个运行程序。空壳作业将失败。我们使用Ansible来提供我们的跑步者,这是我们唯一的改变。我们尝试了几次从相同的脚本配置18.04和20.04,只更改了AMI ID。

当前的错误行为是什么?

使用Shell executor的作业在“准备环境”步骤中失败。

预期的正确行为是什么?

使用Shell执行器的作业通过“准备环境”步骤并执行shell脚本。

注意:这个问题最初是在这里提出的,gitlab-社区

EN

回答 1

Stack Overflow用户

发布于 2022-03-29 12:38:05

我在AWSUbuntu20.04上使用gitlab runner的shell执行器也有相同的错误,我从/home/gitlab-runner中删除了所有的/home/gitlab-runner文件,这似乎解决了这个问题。

如果您的用户名gitlab运行以下命令

代码语言:javascript
运行
复制
sudo rm -rf /home/gitlab-runner/.*

这个答案最初是在这里给出的,gitlab-社区

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71662174

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档