Update center behind proxy : howto with https bint

2019-01-23 03:44发布

Recently, SonarQube uses the bintray repository for package distribution, in https (see update-center.properties).

Using the update center behind a proxy, some updates are found but when upgrade, error (here for xml plugin) :

Fail to download the plugin (xml, version 1.3) from https://sonarsource.bintray.com/Distribution/sonar-xml-plugin/sonar-xml-plugin-1.3.jar (error is : Fail to download: https://sonarsource.bintray.com/Distribution/sonar-xml-plugin/sonar-xml-plugin-1.3.jar (no proxy)) 

The SonarQube:DefaultHttpDownloader seems not support https.proxyXXX properties.


Is there today a mean to use the update center for these plugins ?


@SonarSource : This feature could be supported in sonar.properties for the future ? Or declare http url for bintray repository (but evil) ?

Thanks

标签: sonarqube
3条回答
等我变得足够好
2楼-- · 2019-01-23 04:31

The properties https.proxyHost and https.proxyPort are finally supported in SonarQube 5.5. Thanks Alix for the feedback. https://jira.sonarsource.com/browse/SONAR-7429

查看更多
forever°为你锁心
3楼-- · 2019-01-23 04:36

Is there today a mean to use the update center for these plugins ?

In sonar.properties use sonar.web.javaAdditionalOpts parameter to declare https.proxyXXX properties :

sonar.web.javaAdditionalOpts=-Dhttps.proxyHost=proxy.company.com -Dhttps.proxyPort=80 -Dhttps.proxyUser=myUser -Dhttps.proxyPassword=myPassword

NB :

  • https.proxyUser/https.proxyPassword are useless if the same as http.proxyUser/http.proxyPassword further in the configuration.
  • This answer has been tested with SonarQube v4.5 series

Perhaps one day some specific properties will be available in SonarQube config :-).

查看更多
做自己的国王
4楼-- · 2019-01-23 04:46

I tried updating sonar.web.javaAdditionalOpts in sonar.properties, but the settings were not picked up (using sonarqube:5.1.1 docker image).

I had to adapt the startup script:

My docker command:

RUN sed -i -e 's/-Djava.security.egd=/-Dhttps.proxyHost=proxy.mycompany.com -Dhttps.proxyPort=8080 -Dhttp.proxyHost=proxy.mycompany.com -Dhttp.proxyPort=8080 -Djava.security.egd=/g' /opt/sonarqube/bin/run.sh
查看更多
登录 后发表回答