maven发布 - >同行未经过身份验证 [英] maven release -> peer not authenticated

查看:142
本文介绍了maven发布 - >同行未经过身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试释放我的软件(之前我从未这样做过),到目前为止我已经能够执行mvn release:prepare。当我正在执行release:执行时出现以下错误:

I'm experimenting a bit with releasing my software (I've never done this before) and so far I've been able to execute mvn release:prepare. As I'm executing release:perform I get the following error:


[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plug
in:2.7:deploy (default-deploy) on project img2stl: Failed to deploy artifacts: C
ould not transfer artifact nl.byterendition:img2stl:jar:0.9 from/to byterenditio
n-releases (https://localhost:443/svn/repo/releases): peer not authenticated ->
[Help 1]

我在localhost:443设置了一个本地密码保护的svn存储库,所以我将以下内容添加到我的.m2文件夹中的settings.xml

I've set up a local password protected svn repository at localhost:443, so I added the following to my settings.xml in my .m2 folder

编辑包括Edwin Buck的答案:

EDITED TO INCLUDE Edwin Buck's answer:

<?xml version="1.0" encoding="UTF-8"?>

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

    <servers>
        <server>
            <id>byterendition-releases</id>
            <username>username</username>
            <password>password</password>
        </server>
        <server>
            <id>byterendition-snapshots</id>
            <username>username</username>
            <password>password</password>
        </server>
    </servers>
</settings>

这是我朋友的有用部分:

This is the useful section of my pom:

<distributionManagement>
    <repository>
        <id>byterendition-releases</id>
        <url>https://localhost:443/svn/repo/releases</url>
    </repository>
    <snapshotRepository>
        <id>byterendition-snapshots</id>
        <url>https://localhost:443/svn/repo/snapshots</url>
    </snapshotRepository>
</distributionManagement>

如何让maven访问svn存储库?

How can I get maven to access the svn repository?

好的,正如Edwin Buck建议我不应该使用localhost,但由于我无法让它工作,否则我想我会尝试使用我用来工作的远程SVN服务器。现在我得到一个不同的错误:

Ok, as Edwin Buck suggested I shouldn't use localhost, but since I haven't been able to get it to work otherwise I thought I'd try this using a remote SVN server I use for work. Now I get a different error:


[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plug
in:2.7:deploy (default-deploy) on project img2stl: Failed to deploy artifacts: C
ould not transfer artifact nl.byterendition:img2stl:jar:0.9.5 from/to byterendit
ion-releases (https://svn.science.ru.nl/repos/estens/releases/): Failed to trans
fer file: https://svn.science.ru.nl/repos/estens/releases/nl/byterendition/img2s
tl/0.9.5/img2stl-0.9.5.jar. Return code is: 409, ReasonPhrase: Conflict. -> [Hel
p 1]

再次,我可以从Eclipse访问此repo。有谁知道我做错了什么?

Again I can access this repo from Eclipse. Does anyone know what I'm doing wrong?

推荐答案

从版本3.0.5开始,Maven会检查https连接上的SSL证书。您可以通过添加命令行参数暂时解决此问题

Since version 3.0.5 Maven checks the SSL certificate on https connections. You can temporarily fix this by adding the command line parameters

-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true

将SSL证书安装到JRE中应永久解决问题。

Installing the SSL certificate into your JRE should permanently fix the issue.

官方文件: http://maven.apache.org/wagon/wagon-providers/wagon-http/

这篇关于maven发布 - &gt;同行未经过身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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