F0cus
F0cus

Reputation: 625

Eclipse -Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-2.1-bin.zip'

I am trying to create a new gradle project in eclipse Due to security reasons, Eclipse cannot download any plugins/software

I get the below error , when i try to create a gradle project,

unable to find valid certification path to requested target Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-2.1-bin.zip'.

But I already downloaded the zip file in my local machine, How to add this zip gradle-2.1-bin.zip in eclipse ?

Upvotes: 2

Views: 35390

Answers (7)

Bhupendra Bhoi
Bhupendra Bhoi

Reputation: 51

I was also facing this issue and resolved it by fixing the build using following steps.

Go to the project home directory. Run the below two commands

 1) gradle wrapper 
 2) .\gradlew build

After these steps are completed, refresh the project in IDE using Gradle > Refresh Gradle Project

Upvotes: 1

Knut
Knut

Reputation: 366

I run into a similar Problem, when I installed a newer version of Eclipse and Gradle on my windows system. The settings have been the same as in my older setup, only older versions and they had no problem.

Turns out, that I there was not enough space left on my GRADLE_USER_HOME dir. Thus I recommend if anybody is facing the same issues, clean your disk space (for me it was c:) or setup gradle repo to another partition.

Upvotes: 0

yanike
yanike

Reputation: 847

Try these following steps:

Upvotes: 11

Bakul Kakadiya
Bakul Kakadiya

Reputation: 41

Gradle distribution is available over http and https

I have changed wrapper/gradle-wrapper.properties > distributionUrl to be http instead of https and it worked for me.

Upvotes: 0

NoDataFound
NoDataFound

Reputation: 11959

While the other answers works, it does not fix the core issue which might come back later. Since I had the same error at work, I think this would help:

The error unable to find valid certification path to requested target indicate that Eclipse failed to access the site using HTTPS because it can't recognize the certificate for various reasons:

  • This might be a self signed certificate (highly doubtful for gradle.org)
  • The CA COMODO ECC Domain Validation Secure Server CA 2 is not valid;

You can check which Root CA is in your trust store using the Java panel: if it is missing, then you get your explanation.

  • You may add it to your trust store using the Java CPL. You need to export the certificate first in your browser.
  • You may add the certificate of the website but I would not recommend it: you will have problems with website using the same CA.
  • You could try to update your JDK to latest JDK8/11, but be wary that Eclipse might not use the JRE/JDK you expect it to use; for that, you'll need to use the -vm launch parameter.

Upvotes: 0

F0cus
F0cus

Reputation: 625

Got the Solution from the SO question

Spring STS 3.6.1 and Gradle plugin

Solution is

navigate to Windows->Preferences->Gradle. On the right hand pane , set folder under gradle distribution to path to gradle directory. I set it to "C:\software\gradle-2.6"

Upvotes: 3

thomasters
thomasters

Reputation: 183

Try adding your downloaded zip file to .gradle/wrapper/dists/ so it looks like .gradle/wrapper/dists/gradle-2.1-bin

Upvotes: 0

Related Questions