問題
[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
然后登錄就解決問題了