【harbor登录】
[root@master harbor]# docker login -u admin -p Harborxxx docker.gayj.cn
【报错】
Error response from daemon: Get https://docker.gayj.cn/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
【解决】
[root@master harbor]# cat /etc/hosts
148.70.252.12 docker.gayj.cn #不可解析
192.168.4.114 docker.gayj.cn
【操作】
直接删除不可解析域名
#重新登录
root@master harbor]# docker login -u admin -p Harbor12345 docker.gayj.cn
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
【报错】
Error response from daemon: Get https://docker.gayj.cn/v2/: dial tcp: lookup docker.gayj.cn on 114.114.114.114:53: no such host
【解决】
echo “192.168.x.x docker.gayj.cn on >>/etc/hosts”
【报错】
Error response from daemon: Get https://docker.gayj.cn/v2/: x509: certificate signed by unknown authority
【解决】
拷贝生成的秘钥
#scp -r /data/cert/ssl/docker.gayj.cn.pem root@192.168.x.x:/root/docker.gayj.cn.crt
#mkdir -p /etc/docker/certs.d/docker.gayj.cn
#cp /root/docker.gayj.cn.crt /etc/docker/certs.d/docker.gayj.cn/