Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Peer not authenticated while importing Gradle project in eclipse

While I am importing gradle project in eclipse, it is giving me this error.

FAILURE: Build failed with an exception.  * What went wrong: A problem occurred configuring root project 'test'. > Could not resolve all dependencies for configuration ':classpath'.    > Could not resolve de.richsource.gradle.plugins:gwt-gradle-plugin:0.3.      Required by:          :test:unspecified       > Could not GET 'https://github.com/steffenschaefer/gwt-gradle-plugin/raw/maven-repo/de/richsource/gradle/plugins/gwt-gradle-plugin/0.3/gwt-gradle-plugin-0.3.pom'.          > peer not authenticated  * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 

I am using internet via proxy connection. If that is the issue, where to specify the proxy settings inside eclipse. In General-->Network connections, proxy settings are already there

Please help.

like image 654
MrTambourineMan Avatar asked Apr 05 '14 22:04

MrTambourineMan


People also ask

What does peer not authenticated mean?

This exception indicates that the Java application's truststore was unable to validate the certificate chain. This can occur when the external target's certificates have not been imported into the truststore or one or more of the certificates have expired.

How do I set Gradle preferences in Eclipse?

After generating the Eclipse project files, you can import the project into a Eclipse workspace. It is important to add the GRADLE_USER_HOME variable in Eclipse: Window->Preferences->Java->Build Path->Classpath Variable. Set it to the path of the ~/. gradle folder in your home directory (e.g. /home/<user_name>/.


1 Answers

NOTE: Please ensure the server is trustworthy before you follow these steps.

If you get any other error like this:

 Could not GET 'https://some_server.com/some/path/some.pom'.      > peer not authenticated 

Then you need to import a certificate :

  • open the 'https://some_server.com/some/path/some.pom' in your favorite browser
  • export the cert using the Steps to export cert from a web site
  • copy the cer into JDK_HOME/jre/lib/security folder
  • open a shell and go to JDK_HOME/jre/lib/security folder
  • then import the cer into java using the
keytool -import -alias <the short name of the server> -file <cert_file_name_you_exported.cer> -keystore cacerts -storepass changeit 

It will prompt you to import the certificate, type yes and press enter.

Then restart your eclipse and try building the project.

like image 57
dev2d Avatar answered Sep 27 '22 21:09

dev2d