harbor仓库无法用docker login登录,一直报x509: cannot validate certificate for 172.17.10.29 because it doesn’t contain any IP SANs
1、检查docker和harbor的服务是否启动
[root@k8s-harbor harbor]#systemctl status harbor.service
[root@k8s-harbor harbor]#systemctl status docker.service
2、在浏览器登录验证
3、查看docker的详细信息,发现镜像仓库的地址还是安装时默认的(找到问题的根源了)
4、修改docker的仓库地址
[root@k8s-harbor ~]#cat /etc/docker/daemon.json
{
"insecure-registries":["harbor.magedu.net"]
}
#重启docker服务
[root@k8s-harbor ~]#systemctl restart docker.service
5、登录harbor仓库
[root@k8s-harbor ~]#docker login harbor.magedu.net