Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Still missing self-signed cert for jenkins bitbucket branch source plugin

Tags:

java

ssl

jenkins

So I have a Jenkins master which I needed to add self-signed SSL certificates to to get the HTTPS connection to our bitbucket server working.

Java: C:\Program Files\Java\jre1.8.0_4 CACerts: $($java_path)\lib\security\cacerts

I am now wanting to use the branch source plugin which use HTTP to connection to bitbucket but I get the following error:

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Looking around this would be the an issue because I have not added the Certs to the cacerts file, however I am certain that they are added, I have checked that they are contained in the cacerts file, can the same jenkins instance be using different cacerts files ? if so does anyone know where this cacerts file might be?

like image 968
JamesD Avatar asked Dec 31 '25 15:12

JamesD


1 Answers

Jenkins is running through the jvm you've setup , the cacerts file is generally on "C:\Program Files\Java\youjdkversion\jre\lib\security" path , I have been stuck for days trying to solve that problem and that guide helped me to solve it : https://github.com/escline/InstallCert

Remember to restart jenkins as your new certs will be used on the next jvm run , and not in the current one

like image 98
3Daygg Avatar answered Jan 03 '26 04:01

3Daygg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!