Skip to content

Instantly share code, notes, and snippets.

@ibrokemypie
Last active January 1, 2017 19:23
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ibrokemypie/e84868812ae9e266052647a35cee1312 to your computer and use it in GitHub Desktop.
maven gello ssl fix
verify the certificate if wished at https://cryptoreport.rapidssl.com/checker/views/certCheck.jsp
run the following command to download the "RAPIDSSL 256 RSA CA Certificate" that maven.cyanogenmod.org fails to supply from ssllabs.com
curl https://www.ssllabs.com/ssltest/getTestChain?d=maven.cyanogenmod.org&s=216.168.38.166&cid=df15fa3d6dabd666a8c1e299421405616c9e9846aa25a22497184e1f305227be&time=1481872060432 -o maven.crt
run following to import the certificate into Java's trust store:
keytool -v -alias mavensrve -import \
-file maven.crt\
-keystore $JAVA_HOME/jre/lib/security/cacerts
the default password is "changeit", so enter that unless you have changed it already.
put the following into ~/.mavenrc (nano ~/.mavenrc) to make sure Maven uses the correct trust store.
JAVA_HOME=/usr/lib/jvm/java-8-openjdk
MAVEN_OPTS="-Djavax.net.ssl.trustStore=/usr/lib/jvm/java-8-openjdk/jre/lib/security/cacerts \
-Djavax.net.ssl.trustStorePassword=changeit \
-Djavax.net.ssl.trustStoreType=JKS"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment