Jenkins not able to access Self signed Sonar Server
来源:互联网 发布:下载美篇软件 编辑:程序博客网 时间:2024/05/03 18:28
在公司内网我们也会开始SSL Security,带来的问题就是通常这种情况下的certificate都是self signed,在java的ssl验证的时候通过不了。关于如何在Java中访问Self-Signed or Privated Certificated 的https server,具体可以参考:https://support.sonatype.com/hc/en-us/articles/213465088-Maven-is-unable-to-connect-to-Nexus-after-configuring-Nexus-to-use-SSL- 中的第一点和第三点。
这里具体说下第一种(https://support.sonatype.com/hc/en-us/articles/213465768-SSL-Certificate-Guide#java-client-trust-self-signed)的做法:
1. 把server的cer文件下载下来:
keytool -printcert -rfc -sslserver example.com > example.cer
- 把server的cer文件导到特殊的的truststore文件里面 (默认jks)模式。
keytool -importcert -file example.cer-alias example.com -storepass changeit -keystore example.jks
- 在执行Java应用(如Maven)时,加入启动参数:
-Djavax.net.ssl.trustStore=<path to example.jks> -Djavax.net.ssl.trustStorePassword=changeit
这里要说的是在我们的系统中按照第一点执行之后还是出问题,依然抱同样的错,百思不得其解,通过mvn:dependency发现用的sonar plugin有不同,期望用的是
<groupId>org.codehaus.mojo</groupId> <artifactId>sonar-maven-plugin</artifactId> <version>2.7.1</version>
结果用的是
<groupId>org.sonarsource.scanner.maven</groupId> <artifactId>sonar-maven-plugin</artifactId> <version>3.0.2</version>
官方scanner的plugin用的是internal的okhttp,不知道是不是导致配置失效。
注:Java ssl启动参数除了ssl.trustStore还有ssl.keystore. truststore是用来存储信任的站点安全信息,keystore是用来存储私有站点的key信息。
0 0
- Jenkins not able to access Self signed Sonar Server
- Issue: Server principal is not able to access the database under the current security context
- Not able to reset SmartRF04DD
- git clone出现fatal: unable to access 'https://': SSL certificate problem: self signed certificate in c
- git clone出现fatal: unable to access 'https://': SSL certificate problem: self signed certificate in
- 138 Your database instance is running. You are not able to access Oracle Enterprise Manager Database
- How to generate self-signed SSL certificates
- tigase客户端通过ip访问 Not able to connect Android client with local XMPP server
- Sonar Jenkins
- ArcGIS Server注册共享文件夹报错/地理数据库同理【the arcgisserver is not able to connect to the specified directory】
- How to create a self-signed SSL Certificate
- 异常Not able to obtain connection的解决办法
- Not able to wire events in user control
- cmake not able to find pkg-config 、openssl
- WindowBuilder was not able to show the GUI
- CocoaPods was not able to update the `master` repo....
- 解决 CocoaPods was not able to update the `master` repo
- self signed certificate
- IPv4子网划分与聚合
- 【bzoj3196】【二逼平衡树】【线段树套平衡树】
- 大学毕业4年-回顾和总结(10)-文档化战略,执行最成功的战略,堪比我人生中的“隆中对”(战略在前,成果在后)
- 如何使用hugo搭建个人博客(四):添加评论系统disqus
- Android Studio 报错总结
- Jenkins not able to access Self signed Sonar Server
- HDU 2899 Strange fuction(三分)
- 如何在mac终端上使用python3.5
- leetcode-Merge k Sorted Lists-23(未完待续)
- AltertDialog在DialogFragment中的使用
- 电商之梳理hibernate知识---开发基框架础
- tomcat启动maven依赖项目报错:java.lang.ClassNotFoundException: com.test.core.listener.ContextParameterLi
- TC 8.52a 32位绿色精简版
- 操作系统的体系结构