无法在Docker中{GIDLab CI克隆回购

时间:2017-05-18 10:13:36

标签: git gitlab-ci gitlab-ci-runner

我在使用GitLab CI方面遇到了一些麻烦。对于上下文,这是我尝试配置的第一个CI。 GitLab通过Omnibus软件包安装,在CentOS 6 64位上为9.0.6CE版本。 GitLab跑步者安装在2个系统上:Ubuntu 16.04 64位和CentOS 6 64位。第二个跑步者与GitLab在同一台服务器上。跑步者的版本为9.1.1。通过存储库安装。我在Docker服务中试过跑步者,但它没有改变结果。 服务器位于具有身份验证的代理服务器之后,这限制了他们对Internet的访我已将服务器配置为管理代理(环境变量等),Docker可以从Internet检索图像。

我有PHP项目,我想在每次推送时做一些PHPUnit测试。当我在当地经营跑步者时,一切都很顺利。但是当GitLab CI激活跑步者时,git存储库无法克隆。你有任何解决方案甚至建议解决问题吗?

.gitlab-ci.yml:

image: php:7.1.0

before_script:
  - bash ci/docker_install.sh > /dev/null

test:php7.1:
  script:
    - phpunit --coverage-text -c app/
  tags:
    - docker

工作结果:

Running with gitlab-ci-multi-runner 9.1.1 (6104325)
on arthur-docker (7b16a671)
Using Docker executor with image php:7.1.0 ...
Using docker image sha256:bca6e849844c9924fda99a3d8e271d37d9ed4fb5bc5727c3fe6c3ba171a4fdae for predefined container...
Pulling docker image php:7.1.0 ...
Using docker image php:7.1.0 ID=sha256:97c69bd40b40e1a1338409408ceb61b779097cc857037305450ad9a1ea249695 for build container...
Running on runner-7b16a671-project-138-concurrent-0 via f24c7be7d1da...
Cloning repository...
Cloning into '/builds/ems/gest_dev'...
fatal: repository 'http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@internal.server.ratp:82/ems/gest_dev.git/' not found
ERROR: Job failed: exit code 1

2 个答案:

答案 0 :(得分:1)

点击此处的问题:

  1. https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/1721
  2. https://gitlab.com/gitlab-org/gitlab-ce/issues/22501
  3. 简答:

      

    remote:不允许通过HTTP进行Git访问

答案 1 :(得分:0)

第一个诊断步骤

您的List.toString()看起来是否合适?

.gitlab-ci.yml

请注意缩进,尤其是关于image: php:7.1.0 before_script: - bash ci/docker_install.sh > /dev/null test:php7.1: script: - phpunit --coverage-text -c app/ tags: - docker 的缩进,因为您的POST显示YAML正确但Gitlab不正确。 docs表示它需要位于tags: job作业内。

相关问题