简体   繁体   中英

Using gerrit rest api for Jenkins gerrit trigger

i want to enable Rest API for our gerrit tigger jenkins plugin.

So whenever i give the http username/password in the rest api enablement section of the gerrit tigger plugin. i get the following exception

Connection error : sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

The password i took is from our gerrit installation's -> settings-> http password UI. I am not aware of the internal of our git/gerrit server installation and its configurations

my ssh connection for normal git+gerrit operations works fine.

Probably i am missing something very simple.

EDIT Jenkins version : 2.7

Gerrit version : 2.12.2-49-g70b6923

Gerrit trigger plugin: 2.20.0

Regards,

Saurav

This error occurs when Java code try to connect through https using ssl certificate which is not listed in cacerts file of jre.

Solution

Step 1

Locate which JRE is responsible for this error.This is most important and but easy task!

Step 2

Open that HTTPS URL in CHROME BROWSER which gives this error most probably you have problem with https url of Gerrit server!

Step 3

-> After page load click on Lock like symbol located just left side of your url.Click on it.

-> Click on details

-> Click on view certificate.

-> select TOP MOST CERTIFICATE in hierarchy and Drag and drop certificate image to desktop.

NOW YOU GOT CERTIFICATE.

Step 3

Detailed GUIDE how to install the certificate at cacerts file of jre is THIS link

NOTE: Please post problem with details

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM