[英]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.