美文网首页
harbor unauthorized: unauthorize

harbor unauthorized: unauthorize

作者: 大鹏一怒乘风起 | 来源:发表于2022-05-26 21:15 被阅读0次

    nginx 代理> harbor

    登录成功

    [rdc@ci-linux-build-02 ~]$ docker login -u test hub.uat.test.com
    Password: 
    WARNING! Your password will be stored unencrypted in /data/rdc/.docker/config.json.
    Configure a credential helper to remove this warning. See
    https://docs.docker.com/engine/reference/commandline/login/#credentials-store
    
    Login Succeeded
    

    但是推送失败

    The push refers to repository [hub.uat.test.com/test/test]
    4fc242d58285: Pushing [==================================================>]  5.575MB/5.575MB
    unauthorized: unauthorized to access repository: test/test, action: push: unauthorized to access repository: test/test, action: push
    

    排查之后发现是因为nginx 代理配置问题

    ···
      location / {
          proxy_pass http://10.1.3.3:8080;
            proxy_set_header Host $host:$server_port;
            proxy_set_header X-Forwarded-For $remote_addr;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_redirect http:// $scheme://;
      }
    ···
    

    相关文章

      网友评论

          本文标题:harbor unauthorized: unauthorize

          本文链接:https://www.haomeiwen.com/subject/yuspprtx.html