修改gitlab-runner的PATH [英] Modify PATH for gitlab-runner

查看:127
本文介绍了修改gitlab-runner的PATH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Windows 10机器上安装 gitlab-runner (执行程序 shaell ).我在gitlab服务器上开始工作,它总是以消息找不到命令"git" (大致翻译成英文)结尾.事实上, git 并不是我的工作之路.如何为 gitlab-runner 开始的外壳修改 PATH 变量?

I want to install a gitlab-runner (executor shaell) on my Windows 10 box. I start the job on the gitlab server and it always ends up with the message the command "git" cannot be found (roughly translated into english). As a matter of fact git is not part of my path. How can I modify my PATH variable for the shell the gitlab-runner starts?

要在Windows的命令行上使用git,我通常使用以下语句设置它: PATH%PATH%C:\ Program Files \ Git \ bin .

To use git on the command line in windows I usually set it with the statement: PATH %PATH%C:\Program Files\Git\bin.

是否在某个地方有记载, git 必须可供跑步者使用?如何查看跑步者调用的命令行(即对git的调用)?

Is it documented somewhere, git has to be available to the runner? How can I see the command line the runner invokes (i.e. the call to git)?

推荐答案

出于测试目的,我启动了 gitlab-runner ,例如: gitlab-runner -l debug --debug run-config config.toml --service gitlab-runner ,位于 gitlab-runner.exe config.toml 文件所在的目录.

For testing purposes I started the gitlab-runner like: gitlab-runner -l debug --debug run --config config.toml --service gitlab-runner from the directory where the gitlab-runner.exe and the config.toml file reside.

我在 config.toml 文件的 runners 部分中添加了以下行:

I added the following line to the runners section of my config.toml file:

environment = ['PATH =%PATH%; d:/java/bin; C:/Program Files/Git/bin; c:/程序文件(x86)/apache-ant-1.10.1/bin']

这篇关于修改gitlab-runner的PATH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆