I am using below lines of code to verify broken links
   huc = (HttpURLConnection) (new URL(url).openConnection());
   huc.setRequestMethod("HEAD");
   huc.setReadTimeout(5000);
   huc.connect();
   respCode = huc.getResponseCode();
when script enters huc.connect() line , it throws below exception.
javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
How can I solve it? I need to run this script locally and also in github actions pipeline.
 
     
    


