Sonar-scanner cli is failing with PKIX path security issue in jenkins

We installed sonar-scanner cli in our Jenkins environment and using the below command in Jenkins freestyle job to scan the application.

sonar-scanner -Dsonar.projectName=abcd -Dsonar.projectVersion=1.0.10

but the scan is failing with the below error

Caused by: PKIX path building failed: unable to find valid certification path to requested target

sonar version : Community Edition , Version 8.4.2 (build 36762)
sonar-scanner version :

Help appreciated!!

Hi @sakethaligama ,

Welcome to SonarSource Community! :sonarsource:

You need to ensure that you import the correct cert into your Java truststore, most likely. See this link for more information. Even though you aren’t using Cloudbees, it is a similar resolution: PKIX path building failed error message – CloudBees Support