harbor unauthorized: unauthorized to access repository and unknown blob

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://;
  }
···
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容