Search code examples
continuous-integrationgitlabcdgitlab-ci-runner

GitLab Runner Unable to clone repository


I have registred gitlab runner to the gitlab instance. My registered URL is as follows: http://azurestackgitlab1.southeastasia.cloudapp.azure.com/ci

However while running the build for that project; build is getting failed and giving the below message:

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

snippet of config.toml:

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

How to overcome this problem?


Solution

  • You will get this URL mentioned in etc/gitlab/gitlab.rb file. If you will change "hxakzvpf0otezeojz3wqhme5wg.cx.internal.cloudapp.net" with your "http://azurestackgitlab1.southeastasia.cloudapp.azure.com" It should work! For more information you can refer : http://azurestackgitlab1.southeastasia.cloudapp.azure.com/help/administration/environment_variables.md