SonarQube Proxy Configuration, Tricky

后端 未结 5 490
执笔经年
执笔经年 2020-12-16 15:43

I cannot get the proxy configuration to work for SonarQube 4.0 so that I can install plugins.

When i open http://localhost:9000/updatecenter/available i

相关标签:
5条回答
  • 2020-12-16 15:58

    Just an information: I had this problem also. I can see the PlugIns but cannot download it. The problem is, you have to add this line into your sonar.properties, for the https:

    # https-proxy
    sonar.web.javaAdditionalOpts=-Dhttps.proxyHost=xxxxx -Dhttps.proxyPort=xxxx -Dhttps.proxyUser=xxxx -Dhttps.proxyPassword=xxxx
    
    0 讨论(0)
  • 2020-12-16 16:02

    For those running SonarQube in Docker, I had no luck with any suggestion mentioned here. But I found following solution that worked for me (here):

    docker run -d sonarqube -Dhttp.proxyHost=<myproxy.url.com> -Dhttp.proxyPort=<port>
    

    and equivalent of this in a docker-compose notation:

    services:
      sonarqube:
        image: sonarqube
        command: -Dhttp.proxyHost=<myproxy.url.com> -Dhttp.proxyPort=<port>
    
    0 讨论(0)
  • 2020-12-16 16:13

    I used the official documentation and it works: Using the Update Center behind a Proxy

    http.proxyHost=<your.proxy.host>
    http.proxyPort=<yout.proxy.port>
    

    Regards,

    0 讨论(0)
  • 2020-12-16 16:14

    At sonar.properties set the proxy without "http://", only http.proxyHost=myproxy.domain.pt

    Another suggestion is to also add this lines on wrapper.conf:

    wrapper.java.additional.3=-Dhttp.proxySet=true
    wrapper.java.additional.4=-Dhttp.proxyHost=myproxy.domain.pt
    wrapper.java.additional.5=-Dhttp.proxyPort=myproxy.port
    wrapper.java.additional.6=-Dhttps.proxyHost=myproxy.domain.pt
    wrapper.java.additional.7=-Dhttps.proxyPort=myproxy.port
    

    Careful if you have a docker volume, remove it before deploy the new one with this configuration, or otherwise it will keep the original configuration

    0 讨论(0)
  • 2020-12-16 16:15

    My proxy configuration works and looks the following way:

    http.proxyHost=proxy.domain.de
    http.proxyPort=8888
    

    Note that there is no "http://" or anything else before the URL.

    Also, I do not use proxy authentication, so I left "proxyUser" and "proxyPassword" commented out.

    0 讨论(0)
提交回复
热议问题