我的 gitlab.com 注册表 (registry.gitlab.com) 上有多个图像。
我可以将其中一些作为我的 gitlabci 的一部分:
Running with gitlab-runner 16.2.0 (782e15da)
on org-docker-runner-dev Cz4fZWrV, system ID: s_ab8104dd6bf6
Preparing the "docker+machine" executor 00:02
Using Docker executor with image registry.gitlab.com/org/microservices/tf-runner:0.1.1 ...
WARNING: Container based cache volumes creation is disabled. Will not create volume for "/certs/client"
Authenticating with credentials from job payload (GitLab Registry)
Pulling docker image registry.gitlab.com/org/microservices/tf-runner:0.1.1 ...
Using docker image sha256:ffd931f7c294dcd42a82579a65c1693ed1ddb2bfc1b6b95fd51bf24c66350d99 for registry.gitlab.com/org/microservices/tf-runner:0.1.1 with digest registry.gitlab.com/org/microservices/tf-runner@sha256:4b937f08deb883ffd5d4f135ed30b0fbe46719e1e09ba55e01bb9811367730c9 ...
...
图片:
image: $CI_REGISTRY/org/microservices/tf-runner:0.1.1
但是对于其他人来说,身份验证失败。
Running with gitlab-runner 16.2.0 (782e15da)
on org-docker-runner-dev Cz4fZWrV, system ID: s_ab8104dd6bf6
Preparing the "docker+machine" executor 00:02
Using Docker executor with image registry.gitlab.com/org/microservices/kubectl:0.0.2 ...
WARNING: Container based cache volumes creation is disabled. Will not create volume for "/certs/client"
Authenticating with credentials from job payload (GitLab Registry)
Pulling docker image registry.gitlab.com/org/microservices/kubectl:0.0.2 ...
WARNING: Failed to pull image with policy "always": Error response from daemon: pull access denied for registry.gitlab.com/org/microservices/kubectl, repository does not exist or may require 'docker login': denied: requested access to the resource is denied (manager.go:237:1s)
ERROR: Job failed: failed to pull image "registry.gitlab.com/org/microservices/kubectl:0.0.2" with specified policies [always]: Error response from daemon: pull access denied for registry.gitlab.com/org/microservices/kubectl, repository does not exist or may require 'docker login': denied: requested access to the resource is denied (manager.go:237:1s)
图片:
image: $CI_REGISTRY/org/microservices/kubectl:0.0.2
我还尝试按照文档中的描述设置 DOCKER_AUTH_CONFIG var,使用 auth: "username:password" 字符串以 base64 编码作为 gitlab CI/CD 变量,但无济于事。
图片URL、名称和标签必须正确。我可以使用完全相同的用户名:令牌凭据从本地计算机中提取图像。
这里还可能缺少什么?