action: push: unauthorized to access repository
在配置完Harbor 后发现push 功能不可用出现以下问题
unauthorized: unauthorized to access repository: xuegod-web/redis-photon, action: push: unauthorized to access repository: xuegod-web/redis-photon, action: push
查找配置文件
[root@win21 ~]# find / -name config.json 。。。 /root/.docker/config.json /var/lib/pcp/pmdas/json/config.json
发现/root/.docker/config.json 中设在为IP地址而在daemon.json 设的为主机名,更改为同样设置,以下标斜体的
[root@win21 .docker]# cat config.json { "auths": { "win21.inno.com": { "auth": "YWRtaW46TGVub3ZvQDIwMjA=" } } } [root@win21 .docker]# cat /etc/docker/daemon.json { "insecure-registries":["win21.inno.com"] }
再次尝试,成功
[root@win21 .docker]# docker push win21.inno.com/xuegod-web/redis-photon:v2.1.3 The push refers to repository [win21.inno.com/xuegod-web/redis-photon] 5b2a87b87d06: Pushed 24b9420d082c: Pushed f5d31a9d7d81: Pushed 8faeb4338473: Pushed 72021dc640d8: Pushed v2.1.3: digest: sha256:d44deb5f862c566755d2a6a185206bb57169be824cfdcc84c740b9b76e6f9ab6 size: 1366
每天进步一点点,多思考,多总结
版权声明:本文为CNblog博主「zaituzhong」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。