zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    VMware虚拟机安装
    代码搜索的终极武器Ag
    模糊搜索神器fzf
    Python:json、xml、字典各种转换
    03-azkaban安装部署
    linux下环境变量PATH设置错误的补救
    01-编译azkaban
    VMware安装CentOS7
    PS(二)
    等待公交车的时间
  • 原文地址:https://www.cnblogs.com/tingxin/p/14253675.html
Copyright © 2011-2022 走看看