• 欢迎访问少将全栈,学会感恩,乐于付出,珍惜缘份,成就彼此、推荐使用最新版火狐浏览器和Chrome浏览器访问本网站。
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏少将全栈吧
  • 欢迎加博主微信:jiang_shaobo

harbor解决docker push镜像时denied: requested access to the resource is denied : docker

devops admin 11个月前 (11-23) 9414次浏览 已收录 扫描二维码

1.使用Harbor搭建了内部docker仓库,开始可以往harbor push image,登陆了其他账号再推送的时候,提示:

docker push 192.xxx.xxx.xxx/library/ping:latest
The push refers to repository [192.xxx.xxx.xxx/library/ping]
5f70bf18a086: Preparing
d124781fc06a: Preparing
denied: requested access to the resource is denied

解决方法:

vim ~/.docker/config.json

harbor解决docker push镜像时denied: requested access to the resource is denied : docker

denied: requested access to the resource is denied : docker 解决方法

找到auth,删除图中auth的键值对(或者直接删掉),重新docker login登陆输入用户密码授权。

[root@k8s-master ~]# docker login 192.xxx.xxx.xxx
Username: admin
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
[root@k8s-master ~]# docker push 192.xxx.xxx.xxx/library/ping
The push refers to repository [192.xxx.xxx.xxx/library/ping]
5f70bf18a086: Pushed
d124781fc06a: Pushed
latest: digest: sha256:1968494101768d65272024167bddaf0f9633032c2xxx size: 941

原因猜测:harbor上传library权限配置问题。

喜欢 (1)
[🍬谢谢你请我吃糖果🍬🍬~]
分享 (0)
关于作者:
少将,关注Web全栈开发、项目管理,持续不断的学习、努力成为一个更棒的开发,做最好的自己,让世界因你不同。