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://;
}
···
网友评论