Maven-对等方未通过身份验证 [英] Maven - peer not authenticated
本文介绍了Maven-对等方未通过身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
几天前,我的专家停止工作了.更具体地说,它会停止下载依赖项.在下面,我注意到了为找到解决方案而做的一堆信息和步骤.
A few days ago my maven stopped working. To be more specific it stops download dependencies. Below I note bunch of information and steps which I did in order to find solution.
- 我再次检查了settings.xml-我的同事也使用了此文件,他们没有任何问题
- 我安装了Maven 3.0.4、3.0.5、3.1.0-在下载依赖项期间它总是会失败
- 我有3台计算机-2台使用Ubuntu,1台使用Windows.在Windows上,它运行良好,而在Ubuntu上都没有.
-
mvn clean install
在调试模式下生成如下内容:Could not transfer artifact junit:junit:pom:3.8.1 from/to central...: peer not authenticated
stacktrace - 我尝试使用其他参数
mvn -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true clean install
,但是它也失败了.调试模式下的输出以Server key: Could not create EC public key: CKR_DOMAIN_PARAMS_INVALID
结尾
- 如果我手动添加所有依赖项(从我的同事〜/.m2目录复制并粘贴),则
mvn clean install
可以正常工作.因此,似乎只有下载才有问题.
- I double checked settings.xml - this file is used also by my colleagues and they haven't any problems
- I installed Maven 3.0.4, 3.0.5, 3.1.0 - it always fail during download dependencies
- I have 3 computers - 2 with Ubuntu and 1 with Windows. On Windows it works great, on both Ubuntu it doesn't.
mvn clean install
generates in debug mode something like that:Could not transfer artifact junit:junit:pom:3.8.1 from/to central...: peer not authenticated
stacktrace- I tried to use additional parameters
mvn -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true clean install
but it fails also. Output in debug mode ends with:Server key: Could not create EC public key: CKR_DOMAIN_PARAMS_INVALID
- If I add all dependencies manually (copy&paste from my colleagues ~/.m2 directory) then
mvn clean install
works correctly. So, it seems to be a problem only with downloading.
有人有什么建议吗?
推荐答案
我找到了解决问题的方法.确保您具有写入{jdk_directory}/security/java.security
文件的权限(在我的情况下为/etc/java-7-openjdk/security/java.security)
;如果是,则以这种方式修改它:
I found a solution for my problem. Be sure you have rights to write into {jdk_directory}/security/java.security
file (in my case /etc/java-7-openjdk/security/java.security)
and if so, then modify it this way:
来自:
#security.provider.9=sun.security.ec.SunEC
security.provider.9=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg
到
security.provider.9=sun.security.ec.SunEC
#security.provider.9=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg
它解决了我所有计算机上的问题(全部使用maven 3.0.4)
It fixed problem on all my computers (all with maven 3.0.4)
这篇关于Maven-对等方未通过身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文