运行 MSBuild.SonarQube.Runner.exe(2.0 版)时,我收到以下错误:
SonarQube Scanner for MSBuild 2.0
Default properties file was found at C:\path-to-sonar\SonarQube.Analysis.xml
Loading analysis properties from C:\path-to-sonar\SonarQube.Analysis.xml
Pre-processing started.
Preparing working directories...
Checking for updates...
Unhandled Exception: System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required.
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
at System.Net.WebClient.DownloadFile(String address, String fileName)
at SonarQube.Bootstrapper.BuildAgentUpdater.TryUpdate(String hostUrl, String targetDir, ILogger logger)
at SonarQube.Bootstrapper.Program.PreProcess(IBuildAgentUpdater updater, IBootstrapperSettings settings, ILogger logger)
at SonarQube.Bootstrapper.Program.Execute(String[] args, IBuildAgentUpdater updater, ILogger logger)
at SonarQube.Bootstrapper.Program.Main(String[] args)
这是在 Jenkins Windows slave 上运行的,实际上,它确实需要代理身份验证。SonarQube 服务器与 Jenkins 主服务器或从服务器不同。
服务器上的更新中心已关闭,我什至尝试在 SonarQube.Analysis.xml 文件中包含以下属性(只是为了笑):
<Property Name="sonar.updatecenter.active">false</Property>
是否可以关闭 MSBuild SonarQube Runner 中的更新功能?