如何配置地址以获取 gitlab runners 中的存储库?

How to configure the address to fetch for repositories in gitlab runners?

我看到我的运行程序正在尝试从 localhost:8081 克隆存储库。

问题是我的存储库在 gitlab 服务器上,它不是 localhost:8081

我如何让我的 gitlab 告诉跑步者他有另一个地址(比如 10.29.39.29:43823?)

首先,仔细检查“Using Docker Images

Docker, when used with GitLab CI, runs each build in a separate and isolated container using the predefined image that is set up in .gitlab-ci.yml.

To use GitLab Runner with docker you need to register a new runner to use the docker executor:

gitlab-ci-multi-runner register

您还可以查看此 docker 图片:sameersbn/docker-gitlab-ci-multi-runner:使用此图片构建您的 CI 跑步者图片。
issue 4为例(明确设置CI_SERVER_URL

GitLab 应该将 repo URL 发送给 Runner,因此如果 GitLab 发送 localhost:8081 而它确实在 10.29.39.29:43823 上,那么 GitLab 实例是配置错误的,而不是 Runner。

According to the Documentation 您可以通过 adding/editing etc/gitlab/gitlab.rbexternal_url "http://gitlab.example.com" 设置外部 URL,在您的情况下 external_url 10.29.39.29:43823。之后,运行 sudo gitlab-ctl reconfigure 和 Runner 应该可以工作了。

如果您不使用 Omnibus(您绝对应该使用,因为这种事情稍微复杂一些),这将不起作用。

假设这不起作用,您是否自己托管?您使用的是哪个版本的 GitLab 和 GitLab Runner?