VultureMF
VultureMF

Reputation: 49

Getting Gradle handshake_failure error on new installation

I have a new user on our system. He is trying to build the software for the first time, and is getting the following error.

FAILURE: Build failed with an exception.

* What went wrong: 
A problem occured configuring root project 'project_name'
> Could not resolve all artifacts for configuration ':classpath'
  Required by:
      project :
   > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:2.6.6.
      > Could not GET 'https://{url}/nexus/content/groups/public-maven/org/springframework/boot/spring-boot-gradle-plugin/2.6.6/spring-boot-gradle-plugin-2.6.6.pom'
          > The server may not support the client's requested TLS protocol versions (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs/gradle/org/6.8.3/userguide/build_environment/html#gradle_system_properties
              > Received fatal alert: handshake_failure

No one else on the project is getting this error. He has the same cacert as everyone else. He is using the same TLS version as everyone else.

Any help you can provide will be greatly appreciated.

Upvotes: -1

Views: 156

Answers (2)

VultureMF
VultureMF

Reputation: 49

The solution was to add gradle.properties to the ~/.gradle directory with the truststore and keystore defined in them, as below.

systemProp.javax.net.ssl.trustStore=path.to.cacert.jks
systemProp.javax.net.ssl.trustStorePassword=changeit
systemProp.javax.net.ssl.keystore=path.to.user.keystore.jks
systemProp.javax.net.ssl.keyStorePassword=changeit

Upvotes: 0

Shubham Tawde
Shubham Tawde

Reputation: 13

Is your java version upto date? Check your firewall settings to make sure it allows requests made to gradle.

Run ./gradlew clean and try again

Upvotes: 0

Related Questions