pact-foundation / pact-jvm

JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
https://docs.pact.io
Apache License 2.0
1.08k stars 478 forks source link

unable to find valid certification path to requested target when publishing pact files to pactbroker #1275

Open Dattasaisukumar opened 3 years ago

Dattasaisukumar commented 3 years ago

We are using https connection for PACTBROKER and when we are trying to Publish Pact files to Pact broker we are getting error as What went wrong:

Execution failed for task ':pactPublish'.

javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.

We are able to publish Pact files from our Local by updating the certificate manually in JRE folder. But we are executing the Pact scripts from Build Pipeline . So can you please help us in resolving this Issue . we are not mentioning any port number explicitly for application as eks cluster is doing it automatically. so we are not able to do http connection to pactbroker url

mefellows commented 3 years ago

Please search the existing issues in this repository and come back with your findings. You'll find this issue is well documented both here and on the internet.

We are able to publish Pact files from our Local by updating the certificate manually in JRE folder. But we are executing the Pact scripts from Build Pipeline

I'm not sure how you expect it to magically work on your build pipeline if you had to do something to make it work locally.

Dattasaisukumar commented 3 years ago

Please search the existing issues in this repository and come back with your findings. You'll find this issue is well documented both here and on the internet.

We are able to publish Pact files from our Local by updating the certificate manually in JRE folder. But we are executing the Pact scripts from Build Pipeline

I'm not sure how you expect it to magically work on your build pipeline if you had to do something to make it work locally.

Hi Matt In my local I have copied the cer file and it is working fine and pact files are getting published.

mefellows commented 3 years ago

That's my point, you'll need to do something similar for your build environment.

What is it that we can help with for you to achieve that?