简体   繁体   English

GitLab Docker注册表推送失败 - 访问被拒绝

[英]GitLab Docker Registry Push Failed - Access Denied

I'm having trouble pushing to GitLab Container Registry . 我无法推送到GitLab Container Registry

I can login successfully using my username and a personal access token but when I try to push the image to the registry, I get the following error: 我可以使用我的用户名和个人访问令牌成功登录但是当我尝试将图像推送到注册表时,我收到以下错误:

$ docker push registry.gitlab.com/[groupname]/dockerfiles/nodemon

The push refers to a repository 
[registry.gitlab.com/[groupname]/dockerfiles/nodemon]
15d2ea6e1aeb: Preparing 
2260f979a949: Preparing 
f8e848bb8c20: Preparing 
740a5345706a: Preparing 
5bef08742407: Preparing 
denied: requested access to the resource is denied

I assume the issue is not with authentication because when I run a docker login registry.gitlab.com , I get a Login Succeeded message. 我假设问题不在于身份验证,因为当我运行docker login registry.gitlab.com ,我收到Login Succeeded消息。

Where is the problem? 问题出在哪儿?
How should I push my images to GitLab Container Registry? 我应该如何将我的图像推送到GitLab Container Registry?

I got it working by including api scope to my personal access token. 我通过将api范围包含在我的个人访问令牌中来实现它。

The docs states The minimal scope needed is read_registry . 文档声明The minimal scope needed is read_registry But that probably applies for read only access. 但这可能适用于只读访问。

Reference: https://gitlab.com/gitlab-com/support-forum/issues/2370#note_44796408 参考: https//gitlab.com/gitlab-com/support-forum/issues/2370#note_44796408

Had a similar issue, it was because of the url that was used for tagging and pushing the repo. 有一个类似的问题,这是因为用于标记和推动回购的网址。

It should be 它应该是

docker push registry.gitlab.com/[account or group-name]/[reponame]/imagename

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 gitlab CE docker push到s3中托管的注册表失败,并显示“拒绝:禁止访问” - gitlab CE docker push to registry hosted in s3 fails with “denied: access forbidden” Docker 推送到 Azure Container Registry:拒绝访问 - Docker Push to Azure Container Registry: Access Denied Gitlab 注册表:拒绝访问 - Gitlab Registry : Access Denied Docker 推送到私有注册表错误 [拒绝:请求访问资源被拒绝] - Docker push to private registry error [denied: requested access to the resource is denied] 无法将Docker映像推送到gitlab:拒绝:请求的对资源的访问被拒绝 - Impossible to push docker images to gitlab: denied: requested access to the resource is denied `docker pull` 从私有 gitlab 注册表返回 `denied: access forbidden` - `docker pull` returns `denied: access forbidden` from private gitlab registry 无法将docker镜像推送到GCP注册表:拒绝:项目的令牌交换失败 <my_project_id> 拒绝访问 - Unable to push docker image to GCP registry : denied: Token exchange failed for project <my_project_id> Access denied docker推送本地注册表https访问资源失败的问题 - Issue with docker push on local registry https access to ressource denied Gitlab注册表Docker推送因EOF而失败 - Gitlab Registry Docker push fails with EOF Docker推送失败,原因是“访问被拒绝……私有映像” - Docker push failed due to “access denied… private image”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM