Gitlab-CI Runner HTTP Basic Access 被拒绝,使用私有存储库(自托管)



这是我通过单击show complete raw获得的输出,因为普通视图只有 1 条黑线(内部没有日志)。

我尝试了 https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/ci/ssh_keys/README.md 所说的,但没有运气。

我有一个带有两个docker容器的服务器:一个带有gitlab,另一个带有gitlab-runner。我已经使用共享运行器和特定的运行器进行了测试(如下面显示的代码)。在这两种情况下都是相同的:它失败了,因为它无法获取我的存储库。

仅当我将存储库设置为公共(既不是私有的,也不是内部的)时,它才有效(共享和特定运行器)。我想使用私人存储库。

[0KRunning with gitlab-runner 10.1.0 (c1ecf97f)
  on runner-myrepo-js (900c71a4)
[0;m[0KUsing Docker executor with image node:latest ...
[0;m[0KUsing docker image sha256:46da793b60ee30f8df451729e315f531f0acd24a92c8fba10401513530beff99 for predefined container...
[0;m[0KPulling docker image node:latest ...
[0;m[0KUsing docker image node:latest ID=sha256:cbea0ebe4f3cf07daecf22b196ba6b5d76d1fe1b6548098e5bc9dd9b0736f262 for build container...
[0;msection_start:1509656546:prepare_script
[0KRunning on runner-900c71a4-project-32-concurrent-0 via a16b07f5f84b...
section_end:1509656548:prepare_script
[0Ksection_start:1509656548:get_sources
[0K[32;1mCloning repository...[0;m
Cloning into '/builds/gitlab/myuser/myrepo-js'...
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'https://example.com/gitlab/myuser/myrepo-js.git/'
section_end:1509656549:get_sources
[0K[31;1mERROR: Job failed: exit code 1
[0;m

我该怎么办?

我在版本 10 中同时拥有 gitlab 和 gitlab-runner。

我们今天很挣扎,肯定是SSL的问题:

我们的前端使用SSL证书,但后端(gitlab)使用纯HTTP(在代理后面)。这破坏了作业的实时日志和运行者对私有存储库的访问。

在后端添加SSL并强制HTTPS解决了这个问题。

最新更新