Maven PKIX Path Building failed:sun.security.provider.certpath.SunCertPathBuilderException:unable to find valid Certification path

Source: Internet
Author: User

Maven compile time encountered the wonderful problem, very wonderful, all other colleagues have not encountered, just I met

It is unclear because of the use of the latest JDK (1.8 update91) or any other reason. In summary, there is a certificate issue.

It was the case that Maven went to the company's Nexus Center file, and the Nexus was the address that started with HTTPS. The above problem occurs when downloading.

The solution is as follows:

1. Download the certificate

1.1 on the Web browser (I'm using chrome here), turn on the HTTPS link, then click on the small lock in front of HTTPS, then point to details. You can see some information on the right. then click View Certificate. Drag the certificate's icon directly to a path, It was saved. Here's my file called Nexus.rc.dataengine.com.cer.

2. Enter the security path of the JDK

CD $JAVA _home/jre/lib/securiy

3. Execute the Command import certificate

sudo keytool-keystore cacerts-importcert-alias nexussecureca-file/users/kane/nexus.rc.dataengine.com.cer

Maven PKIX Path Building failed:sun.security.provider.certpath.SunCertPathBuilderException:unable to find valid Certification path

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.