简体   繁体   English

Maven-对等方未通过身份验证

[英]Maven - peer not authenticated

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. 在下面,我注意到了为找到解决方案而做的大量信息和步骤。

  1. I double checked settings.xml - this file is used also by my colleagues and they haven't any problems 我仔细检查了settings.xml-我的同事也使用了此文件,他们没有任何问题
  2. I installed Maven 3.0.4, 3.0.5, 3.1.0 - it always fail during download dependencies 我安装了Maven 3.0.4、3.0.5、3.1.0-在下载依赖项期间它总是失败
  3. I have 3 computers - 2 with Ubuntu and 1 with Windows. 我有3台计算机-2台使用Ubuntu,1台使用Windows。 On Windows it works great, on both Ubuntu it doesn't. 在Windows上,它运行良好,而在Ubuntu上都没有。
  4. 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 mvn clean install生成调试模式类似的东西: Could not transfer artifact junit:junit:pom:3.8.1 from/to central...: peer not authenticated 的堆栈跟踪
  5. 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. 我尝试使用其他参数mvn -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true clean install但也失败。 Output in debug mode ends with: Server key: Could not create EC public key: CKR_DOMAIN_PARAMS_INVALID 调试模式下的输出以以下结尾: Server key: Could not create EC public key: CKR_DOMAIN_PARAMS_INVALID
  6. If I add all dependencies manually (copy&paste from my colleagues ~/.m2 directory) then mvn clean install works correctly. 如果我手动添加所有依赖项(从我的同事〜/ .m2目录复制并粘贴),则mvn clean install可以正常工作。 So, it seems to be a problem only with downloading. 因此,似乎只有下载才是问题。

Does anyone have any suggestions what can be wrong? 有人有什么建议可能会出错吗?

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: 确保您有权写入{jdk_directory}/security/java.security文件(在我的情况下为/etc/java-7-openjdk/security/java.security) ,如果是这样,请按照以下方式进行修改:

from: 从:

#security.provider.9=sun.security.ec.SunEC
security.provider.9=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg

to

security.provider.9=sun.security.ec.SunEC
#security.provider.9=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg

It fixed problem on all my computers (all with maven 3.0.4) 它解决了我所有计算机上的问题(全部使用Maven 3.0.4)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Maven 发布 -> 对等方未通过身份验证 - maven release -> peer not authenticated Java 6-> mongodb maven依赖项错误:对等方未通过身份验证 - java 6 -> mongodb maven dependency error: peer not authenticated 试图在JENKINS工作时,maven中的“Peer Not Authenticated” - “Peer Not Authenticated” in maven when trying to run a job in JENKINS Glowstone安装:Maven对等方未通过身份验证/无法解决依赖关系错误 - Glowstone install: Maven peer not authenticated / could not resolve dependencies error 对等方未通过身份验证的Android Studio - Peer not authenticated Android Studio Maven:尽管 settings.xml 具有使用 HTTPS 配置的存储库,但仍无法检索插件描述符和对等未通过身份验证的错误 - Maven: Failed to retrieve plugin descriptor and peer not authenticated errors despite the settings.xml having repositories configured with HTTPS 对于 Java 7 和 Java 6,“Maven 构建失败并出现“javax.net.ssl.SSLPeerUnverifiedException:对等体未经过身份验证” - "Maven builds are failing with "javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated" for Java 7 and Java 6 为什么我会从 Maven Central 收到“收到致命警报:protocol_version”或“peer not authenticated”? - Why am I getting "Received fatal alert: protocol_version" or "peer not authenticated" from Maven Central? Gradle构建中的Android Studio端点和对等方未通过身份验证的错误 - Android Studio Endpoints and peer not authenticated error in gradle build 'Peer Not Authenticated',parse.com SSL证书已过期 - 'Peer Not Authenticated', parse.com SSL certificate expired
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM