问题
[root@master2 ~]# docker login reg.harbor.cn Username: admin Password: Error response from daemon: Get http://reg.harbor.cn/v2/: unable to decode token response: invalid character '<' looking for beginning of value
解决办法
进入harbor目录找到/common/config/registry目录,找到config.yml文件,找到auth: realm:的URL地址有没有错。错了,修改一下然后重启
auth: token: issuer: harbor-token-issuer realm: http://reg.harbor.cn/service/token rootcertbundle: /etc/registry/root.crt service: harbor-registry validation:
然后重启harbor
docker-compose down
docker-compose up -d
然后登录就解决问题了