【发布时间】:2018-03-29 04:20:38
【问题描述】:
我已经在我的 CentOS Linux 版本 7.4.1708 上安装了 Nexus Repository Manager OSS 3.0.2-02。
我还有 CA 证书:
Issued to: \*.mycompany.com
Issued by: Go Daddy Secure Certificate Authority - G2
Valid from 2016-11-12 to 2018-01-11
RSA私钥与我的CA证书匹配,用Certificate Key Matcher检查并报告:
证书和私钥匹配!
在 Nexus3 目录中,我做了以下更改:
添加到文件org.sonatype.nexus.cfg的行:
nexus-args=${karaf.etc}/jetty.xml,${karaf.etc}/jetty-http.xml,${karaf.etc}/jetty-requestlog.xml,${karaf.etc}/jetty-https.xml
application-port-ssl=8443
添加到jetty-https.xml 文件下一行:
KeyStorePath /ssl/test.jks
KeyStorePassword 123456
KeyManagerPassword 123456
TrustStorePath ssl/test.jks
TrustStorePassword 123456
在$NEXUS_HOME/etc/ 中创建 SSL 目录,并在 SSL 目录中创建一个 Java 密钥库文件 test.jks,使用命令:
openssl pkcs12 -export -in mycompany.com.pem -inkey key.pem -name xxx.mycompany.com -out test.pks
keytool -importkeystore -deststorepass 123456 -destkeystore test.jks -srckeystore test.pks -srcstoretype PKCS12
keytool -import -alias bundle -trustcacerts -file gd_bundle.crt -keystore test.jks
Nexus 重启后,我无法通过 URL //xxx.mycompany.com:8443 访问它。火狐说:
您尝试查看的页面无法显示,因为 无法验证接收到的数据的真实性
还尝试这样做:docker login xxx.mycompany.com:8443 并提供默认的admin:admin:123 凭据原因:
来自守护程序的错误响应:获取 xxx.mycompany.com:8443/v1/users/: x509: 未知权威签署的证书
我还尝试通过来自 Google 的各种场景链接证书,包括 How to add certificate chain to keystore?,但在 Docker 上出现错误:
来自守护进程的错误响应:Get //xxx.mycompany.com:8443/v1/users/: EOF
在 Firefox 上,与第一次在 Chrome 上相同:
//xxx.mycompany.com 意外关闭连接
问题:我的错误在哪里,或者如何在 Nexus3 上正确安装 CA 证书?
【问题讨论】:
标签: ssl-certificate x509certificate nexus3