1,问题描述
nginx外网 + harbor nginx容器配置:
外网nginx代理后harbor域名:harbor01.io
harbor.cfg ( hostname = 192.168.56.72 ) ---> pull harbor01.io/xx/yy err
harbor.cfg ( hostname = harbor01.io ) ---> pull harbor01.io/xx/yy ok, push err
common/config/nginx/nginx.conf
修改配置/ , /v2/ , /service/
(proxy_set_header X-Forwarded-Proto https) ---> push harbor01.io/xx/yy ok, pull err
能pull镜像,但是push 镜像出现的问题:unauthorized: authentication required
[root@c7 wrapper-linux-x86-64-3.5.49]# docker push harbor01.io/kuai/nginx
The push refers to repository [harbor01.io/kuai/nginx]
d9eb91d66e2a: Pushing [==================================================>] 3.584kB
ae1f545e4c08: Pushing [========

当通过nginx代理外网访问Harbor时,遇到push镜像失败,表现为'unauthorized: authentication required'。解决方法包括:1) 修改harbor.cfg,确保hostname与外网nginx一致;2) 修改harbor nginx容器配置,将X-Forwarded-Proto设置为https,以临时解决push问题,然后还原该设置以解决pull问题。
最低0.47元/天 解锁文章
238

被折叠的 条评论
为什么被折叠?



