Jul*_*oro 16 registry gitlab docker gitlab-ci
我正在尝试将图像推送到 gitlab 注册表。
我已经做过很多次了,所以我想知道为什么会出现这个错误。
我使用最新标签构建图像:
Successfully tagged registry.gitlab.com/mycompany/rgpd_api:latest
Run Code Online (Sandbox Code Playgroud)
然后我登录并推送:
docker login registry.gitlab.com -u gitlab+deploy-token-91931
docker push registry.gitlab.com/mycompany/rgpd_api:latest
Run Code Online (Sandbox Code Playgroud)
但我得到:
The push refers to repository [registry.gitlab.com/mycompany/rgpd_api]
be679cc302b9: Preparing
denied: requested access to the resource is denied
Run Code Online (Sandbox Code Playgroud)
我给了gitlab+deploy-token-91931代币read_repository和read_registry权利。
我的仓库是:
https://gitlab.com/mycompany/rgpd_api
Run Code Online (Sandbox Code Playgroud)
我检查了文档页面:https://docs.gitlab.com/ee/user/project/container_registry.html
但是当我通过 Gitlab CI 执行此操作时,gitlab-ci-token
我可以正常推。
我也尝试重新生成一个新的令牌,但仍然是同样的问题。
我该如何解决它?
Vag*_*eev 28
我也偶然发现了这个问题,事实证明
denied: requested access to the resource is denied错误消息。因此,通过以下设置:
mytesthello-worldregistry.gitlab.com/mytest/hello-worldcat "<deploy_token>" | docker login -u "<token_username>" --password-stdin registry.gitlab.com您将得到以下结果:
docker push registry.gitlab.com/mytest/hello-world因为集团内有这样的项目denied: requested access to the resource is denied如果您尝试推送带有组中不存在的项目名称标记的图像,例如docker push registry.gitlab.com/mytest/no-project因此,必须再次标记图像以匹配组内的现有路径,例如组或子组内的现有项目。
| 归档时间: |
|
| 查看次数: |
15873 次 |
| 最近记录: |