Maven repository connection issue (unable to find valid certification)
501warhead opened this issue ยท 5 comments
This may be a duplicate issue. I am hoping it is not a duplicate however as I looked rather hard to see if there was one before posting. There were some similar issues but nothing quite solved or directly addressed my problem (although, granted, zml seemed to be aware of the issue). So, let me explain.
Firstly, I cannot build against Vault. I am porting an existing plugin to use Maven dependencies and some of the integrated PEX methods are necessary for it's functionality. This does come after about a day of work to get VaultAPI to work with the plugin but discovering halfway through it wouldn't work fully (it does some manipulation in depth with primary groups and prefixes.) I am not the original author of this plugin but I currently maintain it, and changing the methods around is my last resort as it would result in absolutely no cross compatibility with the older version, and a lot of data will be lost in the transition.
Secondly, I am using the up-to-date maven repo. Such is:
<repository>
<id>pex-repo</id>
<url>http://pex-repo.aoeu.xyz</url>
</repository>
So, onto what the issue is. I have attempted to use ninja.leaping.permissionsex-2.0-SNAPSHOT as well as ru.tehkode.PermissionsEx.permissionsex-1.23.X (x being one of the iterations of 1.23). Both have thrown the error. Printed out from my local maven repo log "permissionsex-2.0-SNAPSHOT.pom.lastUpdated":
#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
#Thu Jan 28 22:16:42 EST 2016
http\://repo.md-5.net/content/repositories/releases/.lastUpdated=1454037401626
https\://hub.spigotmc.org/nexus/content/repositories/snapshots/.error=
http\://repo.comphenix.net/content/repositories/releases/.error=
@default-pex-repo-https\://pex-repo.aoeu.xyz/.lastUpdated=1454037402235
http\://repo.dmulloy2.net/content/groups/public/.error=
https\://hub.spigotmc.org/nexus/content/repositories/snapshots/.lastUpdated=1454037401379
http\://repo.comphenix.net/content/repositories/releases/.lastUpdated=1454037401868
https\://pex-repo.aoeu.xyz/.error=Could not transfer artifact ninja.leaping\:permissionsex\:pom\:2.0-SNAPSHOT from/to pex-repo (https\://pex-repo.aoeu.xyz/)\: sun.security.validator.ValidatorException\: PKIX path building failed\: sun.security.provider.certpath.SunCertPathBuilderException\: unable to find valid certification path to requested target
http\://repo.dmulloy2.net/content/groups/public/.lastUpdated=1454037401476
http\://repo.md-5.net/content/repositories/releases/.error=
Now, after doing some research into the issue I believe (there is a fair possibility I am simply wrong, please forgive me if I am.) that this is tied into an issue with Java + the HTTPS certification. I do not believe it's an issue directly with the repo as it is Java having an issue with the repo.
If you need any additional info I will be happy to provide. I'm hoping that there is a work around that exists, or that this issue could perhaps be remedied. Also, to be noted I have tried a vast swath of possible combinations of dependency names and repository directories. I can provide a list of all the combinations that did not work.
The most recent error log, as of last attempt using ru.tehcode.PermissionsEx:
eclipse.buildId=4.5.0.I20150603-2000
java.version=1.8.0_71
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
org.eclipse.m2e.logback.appender
Warning
Fri Jan 29 15:20:58 EST 2016
Failure to transfer ru.tehkode:PermissionsEx:1.23.4-SNAPSHOT/maven-metadata.xml from http://pex-repo.aoeu.xyz was cached in the local repository, resolution will not be reattempted until the update interval of pex-repo has elapsed or updates are forced. Original error: Could not transfer metadata ru.tehkode:PermissionsEx:1.23.4-SNAPSHOT/maven-metadata.xml from/to pex-repo (http://pex-repo.aoeu.xyz/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Dependency:
<dependency>
<groupId>ru.tehkode</groupId>
<artifactId>PermissionsEx</artifactId>
<version>1.23.4-SNAPSHOT</version>
</dependency>
Although I have used:
<dependency>
<groupId>ninja.leaping.permissionsex</groupId>
<artifactId>permissionsex</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
as well as including several scope options to both.
Thank you for reading! Apologies if I have made a mistake in opening this issue.
EDIT: Also, I am aware the 2.0 version is still in deep development. I was using it just to see if I could pull anything at all from the server.
As you stated it's an issue with your local java installation and the ssl certificate from the pex repo. You need to export the .cert from the pex repo and import it into your local java installation.
There are some tutorials in the internet, but none of them worked for me, as they are outdated and the tools are no longer available.
But I have to admit it, that I gave up after 1 hour and just copied the file into my maven repo folder...
Yeah, you just have to add the LetsEncrypt cert to your local key store -- java installations on some platforms are broken.
This worked for me:
http://stackoverflow.com/a/11617655/3742437