Upsource - PKIX path SSL certs issue

718 views Asked by At

I'm stuck on this problem for a few weeks now and really not sure what do to bypass a SSL error to connect to the Upsource Jetbrains tool. I'm following the below documentation

https://upsource-support.jetbrains.com/hc/en-us/articles/206545609-Using-self-signed-certificates-to-connect-to-a-Git-repo

And added

sudo Library/java/JavaVirtualMachines/adopt-openjdk-11.0.7/Contents/Home/bin/keytool -import -alias brinternal1 -keystore /Users/camposf/Documents/upsource-2020.1.1802/bin/upsource.sh -file Library/Java/JavaVirtualMachines/adopt-openjdk-11.0.7/Contents/Home/lib/security/cacerts

to my terminal (I'm on a Mac) but this message keeps appearing:

This keystore does not support probing and must be loaded with a specified type

We had some issues with SSL and Java before and they were fixed by another developer but am wondering if this could have been some conflict between what was done back then and now?

This is what I believe it may have been used before but it was also for a different JDK version.

sudo keytool -import -alias brinternal1  -file bedrock-ca.pem -trustcacerts /Users/camposf/Documents/upsource-2020.1.1802/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/security/cacerts -storepass changeit

I'm very new to this type of certs work and any help is much appreciated.

Thanks very much.

UPDATE

As per Dave's answer, the command used seemed to be wrong having the paths mixed up. Updated it to the below and got a confirmation message saying the certificate has been added to the keystore. However, still getting the PKIX SSL issue even after restarting the computer. Tried both locally and on docker.

sudo Library/java/JavaVirtualMachines/adopt-openjdk-11.0.7/Contents/Home/bin/keytool -import -alias brinternal2 -keystore Library/Java/JavaVirtualMachines/adopt-openjdk-11.0.7/Contents/Home/lib/security/cacerts -file bedrock.cer

enter image description here

enter image description here

1

There are 1 answers

0
Francislainy Campos On BEST ANSWER

It seems Upsource uses their own JDK. Found out about it by typing

/Users/myUser/Documents/upsource-2020.1.1802/bin/upsource.sh java print

So fixed the issue by typing the following command on my terminal from where the certs file was located (bedrock.cert in our case):

sudo /Users/myUser/Documents/upsource-2020.1.1802/internal/java/mac-x64/bin/keytool -import -alias brinternal2 -keystore  /Users/camposf/Documents/upsource-2020.1.1802/internal/java/mac-x64/jre/lib/security/cacerts -file bedrock.cer

It also seems to be possible to have Upsource to point to your own local jdk by typing

/Users/myUser/Documents/upsource-2020.1.1802/bin/upsource.sh java set <home path for your preferred jdk>

where can be by found using the echo $JAVA_HOME command.

Not sure how advisable would be to change that though.