处理出错:
docker login wjj
Error response from daemon: Get https://wjj/v2/: x509: certificate signed by unknown authority
1)、
生成命令时路径最好选/data数据都在这里保存,注意相对路径即证书名称设置和hostname保持一致
[root@server1 reg.westos.org]# cd /data/certs/
[root@server1 certs]# ls
westos.org.crt westos.org.key
2)、
harbor.yml文件中的hostname设置也要保持一致
hostname: reg.westos.org
3)、
[root@server1 ~]# openssl req \
> -newkey rsa:4096 -nodes -sha256 -keyout certs/westos.org.key \
> -x509 -days 365 -out certs/westos.org.crt
认证中的hostname设置必须都保持一致,否则登陆会出现证书域名认证失败,并且两个主机域名解析都要做好。
#改错成功
[root@server1 reg.westos.org]# docker login reg.westos.org
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