Https://sonarqube/api/server/version is not accessible from the azure devops pipeline. but, I am able to access the same with wget command from the build agent

Sonarqube analysis task in azure devops is failing with the following error.

API GET /api/server/version failed error was {code : UNABLE_TO_GET_ISSUER_CERT_LOCALLY}

I am able to access the same endpoint from the build agent using wget command.

Thanks in advance!

Hi @charuhasan_kappad ,

Welcome to SonarSource Community :sonarsource: !

I believe you encountered this error in the Prepare Analysis step. The Prepare Analysis step that fails with this error is using Node.js. When custom certificates (self-signed, for example) are used, this means it requires passing certificates to the Node process. This is similar to importing certificates into a Java keystore.

You can pass a .pem file containing your certificates to the NODE_EXTRA_CA_CERTS environment variable. The NODE_EXTRA_CA_CERTS environment variable can be set in the Variables tab of an Azure DevOps pipeline (those variables act as environment variables).


1 Like

Thank you @Joe for the quick response. the certificate issue solved and getting dotnet framework compatibility issue. I have installed dotnet 3.1. is it required 2.0.0?

Hi @charuhasan_kappad ,

Please create a new thread with error information from your logs and then we can assist since your original issue has been resolved. I’ll lock this thread for now.