且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

“对等方未通过身份验证" Artifactory插件中的错误-Jenkins

更新时间:2021-11-07 15:53:27

此错误的原因是对Artifactory服务器使用了自签名证书,Jenkins JVM无法识别该证书.使用自签名证书时,这是一个常见问题.
要解决此问题,您将需要将自签名证书导入到Jenkins使用的信任库中(通过运行Jenkins的JRE使用),例如:

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 

在此示例中:
server.cer是您为Artifactory生成的自签名证书.
cacerts是用于Jenkins的信任库.默认情况下,您应该在JRE中找到一个-<JRE_HOME>/lib/security/cacerts.请注意,这与Artifactory使用的密钥库不同.
请注意,默认密钥库密码为changeit.有关更多信息,请参见 keytool

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