My team is trying to run sonar analysis from a build machine behind the company proxy to a sonarqube instance on the cloud.
We tried to provide the proxy settings in SONAR_SCANNER_OPTS environment variable:
but it did not work and still throws this error: The remote server returned an error: (407) Proxy Authentication Required.
Using system level proxy settings is NOT an option for us since those are reset periodically by some policies in our organization.
we also had this issue if a proxy server with authentication is required. Seems that the C# part of the scanner is not reading the proxy settings from SONAR_SCANNER_OPTS?
Sonar Scanner fails at begin command with error message HTTP 407 - Proxy Authentication Required
The Scanner for .NET also needs to have the environment variables used by .NET set. I have updated the scanner documentation in the latest version of SonarQube to make this a bit clearer
You also need to set the appropriate proxy environment variables used by .NET. HTTP_PROXY , HTTPS_PROXY , ALL_PROXY , and NO_PROXY are all supported. You can find more details here.