continuous-integration - GitLab Runner 无法克隆存储库

标签 continuous-integration gitlab cd gitlab-ci-runner

我已将 gitlab runner 注册到 gitlab 实例。我注册的网址如下:http://azurestackgitlab1.southeastasia.cloudapp.azure.com/ci

但是,在为该项目运行构建时;构建失败并给出以下消息:

Running with gitlab-ci-multi-runner 1.11.1 (a67a225)
  on java test (96d320b3)
WARNING: image is not supported by selected executor and shell
Using Shell executor...
Running on AzureStackPOCVM...
Cloning repository...
Cloning into '/home/gitlab-runner/builds/96d320b3/0/root/demoproject'...
fatal: unable to access 'http://gitlab-ci-token:xxxxxx@gitlab-ce.hxakzvpf0otezeojz3wqhme5wg.cx.internal.cloudapp.net/root/demoproject.git/': Could not resolve host: gitlab-ce.hxakzvpf0otezeojz3wqhme5wg.cx.internal.cloudapp.net
ERROR: Job failed: exit status 1

config.toml 的片段:
[[runners]]
  name = "java test"
  url = "http://azurestackgitlab1.southeastasia.cloudapp.azure.com/ci"
  token = "96d320b33d3c69d706dad7f90df84e"
  executor = "shell"
  [runners.cache]

如何克服这个问题?

最佳答案

你会在 etc/gitlab/gitlab.rb 文件中得到这个 URL。如果您将更改“hxakzvpf0otezeojz3wqhme5wg.cx.internal.cloudapp.net”
与您的“http://azurestackgitlab1.southeastasia.cloudapp.azure.com
它应该工作!
更多信息可以引用:http://azurestackgitlab1.southeastasia.cloudapp.azure.com/help/administration/environment_variables.md

关于continuous-integration - GitLab Runner 无法克隆存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45488372/

相关文章:

c# - Team City 阻止构建步骤运行

运行 helm 命令时出现 Gitlab 问题 - 错误 : unknown command "sh" for "helm"

shell - 在 Emacs 中使用 z(跳转)来查找目录

github - 在多个环境中运行 GitHub Action

macos - 在 Windows 服务器和 Mac 代理使用服务器结帐模式时,如何阻止 TeamCity 将符号链接(symbolic link)转换为文件?

continuous-integration - CruiseControl + Starteam : not picking up all files

linux - 直接从 GitLab 私有(private)仓库打开文件

heroku - Gitlab CI/CD env var availabel only on master

git init, add, commit from a different directory

shell - cd 到符号链接(symbolic link)目录在 cron 环境中失败