Archiva Jenkins通过https进行通信

时间:2013-08-12 08:55:27

标签: ssl https jenkins archiva

我尝试通过https protokol建立Archiva和Jenkins之间的通信,但我收到以下错误:

[WARNING] Could not transfer metadata ...:3.5-SNAPSHOT/maven-metadata.xml from/to archiva.snapshots (https://localhost:8443/archiva/repository/snapshots/): **peer not authenticated**
org.sonatype.aether.transfer.MetadataTransferException: Could not transfer metadata ...:3.5-SNAPSHOT/maven-metadata.xml from/to archiva.snapshots (https://localhost:8443/archiva/repository/snapshots/): peer not authenticated
    at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$3.wrap(WagonRepositoryConnector.java:930)
    at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$3.wrap(WagonRepositoryConnector.java:920)
    at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:669)
    at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)
Caused by: org.apache.maven.wagon.TransferFailedException: peer not authenticated
    at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:892)
    at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
    at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
    at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
    at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:601)
    ... 4 more
Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
    at sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:397)
    at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:126)
    at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:572)
    at org.apache.maven.wagon.shared.http4.ConfigurableSSLSocketFactoryDecorator.connectSocket(ConfigurableSSLSocketFactoryDecorator.java:64)
    at org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
    at org.apache.maven.wagon.providers.http.httpclient.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
    at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:645)
    at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:480)
    at org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
    at org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
    at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:746)
    at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:886)
    ... 8 more

P.S。 我生成了安全密钥,并配置了Jetty。 我可以通过https protokol: https://lokal:8443/archiva/browse/ ...连接到Archiva到我的存储库。

但如果我将 pom.xml protokol from http://lokal:8080 更改为* https://lokal:8443* ,我可以'建立,我收到了错误。

1 个答案:

答案 0 :(得分:1)

您的archiva服务器可能存在无效(自签名)SSL证书。您的浏览器可能会显示警告,但仍会显示内容。 Maven代码不会。

以下是解决问题的一些提示:http://developer.cloudbees.com/bin/view/DEV/Maven+with+untrusted+SSL+Certificates

根据您的需要,您可能需要购买SSL证书。