Error response from daemon: Get "https://192.168.237.141/v2/": x509: cannot validate certificate for 192.168.237.141 because it doesn't contain any IP SANs 这个错误就是因为没有定义正确这个文件
# Configuration file of Harbor
# The IP address or hostname to access admin UI and registry service.
# DO NOT use localhost or 127.0.0.1, because Harbor needs to be accessed by external clients.
hostname: 192.168.237.141
# http related config
http:
# port for http, default is 80. If https enabled, this port will redirect to https port
port: 80
# https related config
https:
# https port for harbor, default is 443
port: 443
# The path of cert and key files for nginx
certificate: /opt/harbor/ssl/yourdomain.com.crt #harbor主机上存放证书的位置
private_key: /opt/harbor/ssl/yourdomain.com.key #harbor主机上存放证书的位置
# enable strong ssl ciphers (default: false)
# strong_ssl_ciphers: false
重启harbor
#改变一下环境
./prepare
#在harbor.yaml的目录中,重启
docker-compose down -v
docker-compose up -d
[root@lancy12 ~]# docker login yourdomain.com
Username: admin
Password:
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