“对等方未通过身份验证" Artifactory插件中的错误-Jenkins [英] "peer not authenticated " error in Artifactory plugin - Jenkins

查看:167
本文介绍了“对等方未通过身份验证" Artifactory插件中的错误-Jenkins的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Jenkins 1.566版和Artifactory插件2.2.2版.

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

我在自己的码头容器中运行人工制品2.66.它以http运行,但最近我将其更改为https.

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

现在,如果我将Jenkins配置中的工件服务器url从http更改为https和端口8443,则会收到错误消息:

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"

如果我转到https url并使用相同的用户名和密码登录成功. 为什么会发生此错误,以及如何解决?

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?

感谢您的帮助.

推荐答案

此错误的原因是对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

这篇关于“对等方未通过身份验证" Artifactory插件中的错误-Jenkins的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆