Gitlab运行程序无法使用〜/ .docker / config.json中的凭据进行身份验证

时间:2019-11-14 13:15:12

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

我正在尝试从gitlab CI / CD运行项目,但出现以下错误:

  on Gitlab-runner-1 M--MHsVp
Using Docker executor with image registry.gitlab.com/gitlab-org/cluster-integration/auto-build-image/master:stable ...
Starting service docker:stable-dind ...
Authenticating with credentials from /home/Pq515devops/.docker/config.json
Pulling docker image docker:stable-dind ...
Using docker image sha256:eaed9efc02d231a28b0f7725551a71459a7763e83bcda5464db66ec4684a1639 for docker:stable-dind ...
Waiting for services to be up and running...

*** WARNING: Service runner-M--MHsVp-project-3187-concurrent-0-docker-0 probably didn't start properly.

Health check error:
ContainerStart: Error response from daemon: Cannot link to a non running container: /runner-M--MHsVp-project-3187-concurrent-0-docker-0 AS /runner-M--MHsVp-project-3187-concurrent-0-docker-0-wait-for-service/service (executor_docker.go:1254:0s)

Service container logs:
2019-11-14T12:48:10.698686600Z mount: permission denied (are you root?)
2019-11-14T12:48:10.700536600Z Could not mount /sys/kernel/security.
2019-11-14T12:48:10.700550600Z AppArmor detection and --privileged mode might break.
2019-11-14T12:48:10.703434000Z mount: permission denied (are you root?)

*********

Pulling docker image registry.gitlab.com/gitlab-org/cluster-integration/auto-build-image/master:stable ...
Using docker image sha256:c114dffc16419102b42958970133bc5950c85961747ba2ed9d37741457d829df for registry.gitlab.com/gitlab-org/cluster-integration/auto-build-image/master:stable ...
Authenticating with credentials from /home/Pq515devops/.docker/config.json
Running on runner-M--MHsVp-project-3187-concurrent-0 via Gitlab-runner-1...
Authenticating with credentials from /home/Pq515devops/.docker/config.json
Fetching changes with git depth set to 50...
Initialized empty Git repository in /builds/bsmchstudents/whitesmokerph36/.git/
Created fresh repository.
remote: You are not allowed to download code from this project.
fatal: unable to access 'http://gitlab-ci-token:[MASKED]@gitlab.it.bsmch.net/bsmchstudents/whitesmokerph36.git/': The requested URL returned error: 403
Authenticating with credentials from /home/Pq515devops/.docker/config.json
ERROR: Job failed: exit code 1

我尝试运行其他项目,但它们均以ERROR: Job failed: exit code 1错误结束。 我尝试在网上寻找解决方案,但似乎没有造成此错误的原因,并且尝试了一些其他东西,尽管没有改变,但仍然有所帮助,例如,我看到的一个解决方案是在./bashrc中添加unset cd。并没有改变任何东西。 Gitlab运行程序和docker都安装在gitlab运行程序服务器(Ubuntu 18.04)上。 我有3个共享跑步者,我使用gitlab-runner register命令为gitlab上的每个项目注册了一个跑步者。 在Gitlab中单击“重试”之前,我正在运行gitlab-runner run命令,它会检查所有跑步者的工作,一旦找到它就将其加载,然后过一段时间后发送:WARNING: Job failed: exit code 1 duration=13.6350221s job=19551 project=3187 runner=M--MHsVp WARNING: Failed to process runner builds=0 error=exit code 1 executor=docker runner=M--MHsVp

我认为这可能与/home/Pq515devops/.docker/config.json文件有关:

{
        "auths": {
                "https://index.docker.io/v1/": {
                        "auth": "*****"
                }
        },
        "HttpHeaders": {
                "User-Agent": "Docker-Client/18.09.7 (linux)"
        },
        "proxies": {
                "default": {
                        "httpProxy": "http://10.0.0.10.80",
                        "httpsProxy": "http://10.0.0.10:80"
                }
        }
}

不久前,给出了相同的错误,并添加了代理部分来修复它,直到现在返回相同的错误。

有人对此有修复建议,还是对此有所了解?

0 个答案:

没有答案