0

I´m trying to install some software in Eclipse 2018-12 via its Marketplace. On trying to do so, I keep getting the same error:

Unable to read repository at http://download.eclipse.org/releases/2018-12.
Unable to read repository at https://download.eclipse.org/technology/epp/packages/2018-12/content.xml.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

The company I am currently working with has a proxy active. If that`s what causes this issue (which I am not sure of), how would I bypass it in Eclipse? I tried a manual Network connection with a proxy bypass, but to no avail.

Any help or ideas?

tarekahf
  • 738
  • 1
  • 16
  • 42
BFR
  • 105
  • 1
  • 1
  • 9
  • Are you able to access the URLs with a web browser? What are your settings in _Window > Preferences: General > Network Connections_? With which Java exactly do you run Eclipse? – howlger Aug 20 '19 at 10:18
  • you need to add root ca certificate to java cacerts which eclipse is using or you explicitly set jdk into eclipse. Use [guide1](https://stackoverflow.com/a/57713628/1802348) ,[guide2](https://stackoverflow.com/a/40757655/1802348) ,[guide3](https://stackoverflow.com/a/39075967/1802348) – positivecrux Aug 29 '19 at 15:51

3 Answers3

0

I tried many solutions, but found it is available at https://confluence.atlassian.com/kb/how-to-import-a-public-ssl-certificate-into-a-jvm-867025849.html and solved my problem.

In that case, I used the KeyStore Explorer tool and generated the certificate.

  1. Download KeyStore Explorer and Install
  2. Open the application (Run as administrator) and in Examine => Examine SSL
  3. On the Connection Settings screen => SSL Host: google.com / SSL Port: 443 => Click "OK"
  4. In the certificate, click on "PEM" and "Export".
  5. Save as "public.crt"
  6. Click the "Open an existing KeyStore" button => C:\Program Files\Java\jdk1.8.0_261\jre\ lib\security\cacerts (JDK)
  7. Enter the password: changeit
  8. In Tools => Import trusted certificate => Select the public.crt file => Click "OK"
  9. Save the "cacerts" file.
  10. Repeat steps 6 through 9 for the JRE (C:\Program Files\Java\jre1.8.0_261\lib\security\ cacerts)
  11. Restart your PC.

References:

0

If you are using a https url, change it to http url (just remove 's') and try. In my case 'https://dl.bintray.com/fabioz/pydev/8.0.0/' was throwing cert error, but changing it to 'http://dl.bintray.com/fabioz/pydev/8.0.0/' worked fine.

gannu_lee
  • 283
  • 3
  • 10
0

In my case, I could not open Eclipse Marketplace and got the same error reported in the question of this thread. I was able to solve this problem by getting instructions from the admin since I am connected using VPN. If I disconnect the VPN, it will work without any problem. I am using Eclipse Version: 2022-09 (4.25.0) - Build id: 20220908-1902.

Steps (Windows):

  1. Get the certificate definition files and store them under this folder for example: <user-home>\.certificate\my-certs.pem. If you have more than one certificate, combine the definitions in this file my-cert.pem. In my case I was provided two certificates, they are XXXROOTCA and XXXCERTnn.
  2. If you have more than one certificate, store each in a separate file in the same folder for example file1.crt and file2.crt.
  3. From the command line with admin rights, use the Java keytool to import the certificates:
%JAVA_HOME%\bin\keytool -import -alias XXXROOTCA -file %HOME%\.certificates\file1.crt -cacerts
%JAVA_HOME%\bin\keytool -import -alias XXXCERTnn -file %HOME%\.certificates\file2.crt -cacerts

Note: Make sure to associate the certificate alias with the correct file in the above command lines. 3. You may have to pass the password for the above command lines. Add the parameter -storepass changeit if the password is still changeit and you didn't change it which is the default.

  1. For NodeJS, execute the following command (if required):
setx NODE_EXTRA_CA_CERTS %HOME%\.certificates\my-certs.pem

Now you should be able to open Eclipse Marketplace.

tarekahf
  • 738
  • 1
  • 16
  • 42