11

我是 Gitlab CI 的新手,但已经阅读了一段时间。
每次提交后,我都必须在我的 Gitlab 上测试编译 C#-Projects,并发现我需要使用 Windows Shell-Runner 设置来进行 CI 以正确构建我的项目。

不幸的是,我的 Gitlab 设置只允许开发人员和机器通过 SSH 连接,而不是 HTTP。但是我的 Windows 运行器总是尝试通过 http 连接并且构建失败。

如何正确配置它?
我已经尝试编辑config.toml与 runner 关联的内容,但是没有选项可以指定是使用 ssh 还是 http。

4

1 回答 1

1

如果您的运行器可以通过 ssh 访问,请尝试使用 gitlab-runner register 命令注册它。请参阅Christian Stankowic
的 “ GitLab 持续集成” :

# sudo gitlab-runner register
 Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/ci):
 http://gitlab.localdomain.loc/ci
 Please enter the gitlab-ci token for this runner:
 xxx
 Please enter the gitlab-ci description for this runner:
 [gitlab.localdomain.loc]:
 Please enter the gitlab-ci tags for this runner (comma separated):
 rpm764,generic
 INFO[0035] 7ab95543 Registering runner... succeeded
 Please enter the executor: ssh, shell, parallels, docker, docker-ssh:
 ssh
 Please enter the SSH server address (eg. my.server.com):
 gitlab.localdomain.loc
 Please enter the SSH server port (eg. 22):
 22
 Please enter the SSH user (eg. root):
 su-gitlab-ci
 Please enter the SSH password (eg. docker.io):
 myPassword
 Please enter path to SSH identity file (eg. /home/user/.ssh/id_rsa):
 /home/su-gitlab-ci/.ssh/id_rsa
 INFO[0143] Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!

这将有助于生成config.toml具有正确内容的文件,包括 ssh config

于 2016-04-29T12:23:05.400 回答