[SOLVED] Getting error on Test configuration by sending test e-mail for Jenkins

Issue

This Content is from Stack Overflow. Question asked by Ashish Jain

I am getting error on Jenkins Email test.I have created the app password for gmail and used in jenkin SMTP Authentication in Test configuration by sending test e-mail .But still getting error as

sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)[enter image description here][1]

Solution

The key error is this:

Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

SeeĀ this JavaMail FAQ entry.

Since you’re connecting to Gmail, this shouldn’t happen. The most likely causes are:

  • There’s a firewall or anti-virus program intercepting your request.
  • There’s something wrong in your JDK installation preventing it from finding the trusted certificate authorities
  • You’re running in an application server that has overridden the JDK’s list of trusted certificate authorities

Answered by Bill Shannon, This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5.CC BY-SA 3.0.CC BY-SA 4.0.

people found this article helpful. What about you?