“peer not authenticated ” error in Artifactory plugin - Jenkins

╄→гoц情女王★ 提交于 2019-12-10 16:47:01

问题


I am using Jenkins version 1.566 and Artifactory plugin version 2.2.2.

I am running artifactory 2.66 in its own jetty container. It was running as http but recently I changed it to https.

Now if I change the artifactory server url in Jenkins configuration from http to https and port 8443, I get the error:

"Error occurred while requesting version information: peer not authenticated"

If I go to https url and login using the same user name and password am successful. Why is this error happening and how to fix it?

Any help is appreciated.


回答1:


The cause of this error is using a self signed certificate for the Artifactory server which is not recognized by the Jenkins JVM. This is a common issue when using self signed certificates.
To solve this issue you will need to import the self signed certificate into the truststore used by Jenkins (by the JRE used for running Jenkins), for example:

<JAVA_HOME>\bin\keytool -import -v -trustcacerts
-alias server-alias -file server.cer
-keystore /path/to/cacerts -keypass changeit
-storepass changeit 

In this example:
server.cer is the self signed certificate you generated for Artifactory.
cacerts is the truststore used for Jenkins. By default you should find one inside your JRE - <JRE_HOME>/lib/security/cacerts. Notice this is not the same as the keystore used by Artifactory.
Notice the default keystore password is changeit. For more information take a look at the Oracle documentation for the keytool



来源:https://stackoverflow.com/questions/24920311/peer-not-authenticated-error-in-artifactory-plugin-jenkins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!