gitlab runner : ERROR: Job failed: prepare environment
文章目录
在跑gitlab机器人出现错误:ERROR: Job failed: prepare environment: Process exited with status 1. Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information
查询相关的站点显示错误的原因是由于gitlab runner执行了用户文件夹下的.bash_logout脚本。
一般的解决方法都是将github-runner用户下的.bash_logout中的内容注释掉即可。
但如果我们将机器人定义为ssh类型,则需要将ssh中使用的用户下的.bash_logout文件内容注释掉。这是因为在ssh类型下,gitlab-runner会自动使用设置的用户启动ssh连接,连接成功后查找连接用户下的.bash_logout。
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论