Generate Self Signed certificate
On a Mac at home, with Bigpond internet access. Full host name is silencer.bigpond and IP Address is 10.0.0.9.
1 | terrence@Silencer /Applications/nexus-3.0.0-03/etc/ssl |
OR run “nslookup 127.0.0.1” return full domain hostname e.g. “localhost.bigpond”.
1 | terrence@Silencer /Applications/nexus-3.0.0-03/etc/ssl |
Now, with latest Nexus (version 3.2.0-01) you can use self-signed server certificate without specifying IP address.
1 | terrence@Silencer /usr/local/nexus-3.2.0-01/etc/ssl |
Enable HTTPS access
Change jetty-https.xml file:
1 | terrence@Silencer /Applications/nexus-3.0.0-03/etc |
Add SSL port and include jetty-https.xml in file:
1 | terrence@Silencer /Applications/nexus-3.0.0-03/etc |
Retrieve server’s certificate
1 | 𝜆 keytool -printcert -rfc -sslserver silencer.bigpond:8444 > silencer.bigpond.pem |
To get another Source Code Repository server’s certificate
1 | 𝜆 keytool -printcert -rfc -sslserver bitbucket.cd.paradise.org:443 > bitbucket.cd.paradise.org.pem |
Test
Restart Nexus and access: https://localhost:8444
Note
- Use utility tool “KeyStore Explorer” add additional CA certificates into keystore.jks file, especially when Gradle / Maven output error like:
1 | > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target |