Alfresco auth-rest SDK of ACS gives the error while downloading artifacts

cancel
Showing results for 
Search instead for 
Did you mean: 
om_bijawat
Member II

Alfresco auth-rest SDK of ACS gives the error while downloading artifacts

Jump to solution

I am using Alfresco SDK in my spring boot project, after adding the auth-rest dependency in my pom.xml I tried to download the artifacts, it gives me error
javax.net.ssl|ERROR|01|main|2021-09-08 23:03:49.559 IST|TransportContext.java:341|Fatal (CERTIFICATE_UNKNOWN): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (
"throwable" : {
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Below is the dependency added in pom.xml file
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-auth-rest-api</artifactId>
<version>5.0.4-SNAPSHOT</version>
</dependency>
Thanks

2 Solutions

Accepted Solutions
abhinavmishra14
Advanced

Re: Alfresco auth-rest SDK of ACS gives the error while downloading artifacts

Jump to solution

Try this and see if it works for you:

https://github.com/abhinavmishra14/InstallCert#readme 

java InstallCert artifacts.alfresco.com:443

All the instructions are documented on the github repo.

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

View solution in original post

abhinavmishra14
Advanced

Re: Alfresco auth-rest SDK of ACS gives the error while downloading artifacts

Jump to solution

Pom file doesn't seem to have an issue, it is related to the certificate installed on your local environment. Unless you resolve it, it wont work. 

Did you installed the alfresco certificate correctly to your java11 installation path, e.g if using jdk-11.0.4.: C:\Program Files\Java\jdk-11.0.4\lib\security\cacerts (C:\Program Files\Java\jdk-11.x.x\lib\security\cacerts) ?

Additionally you can open the url https://artifacts.alfresco.com/nexus/content/groups/public/ in browser and see if certificate is valid:

browser validity.pngCERTIFICATE-VALID.pngcopy-to-file.png

 

 

save file.png

After you save the file, launch a command prompt. Open the command prompt as administrator and navigate to the folder where you saved the certificate: e.g.: C:\Users\alfresco222User\Desktop (File is available as C:\Users\alfresco222User\Desktop\alf-pub-repo-cert.cer)

Run the following command to install the cert, default password is "changeit" and provide "yes" when prompted:

C:\Users\alfresco222User\Desktop>keytool -import -alias alf-pub-repo-cert -keystore "C:\Program Files\Java\jdk-11.0.4\lib\security\cacerts" -file alf-pub-repo-cert.cer
Warning: use -cacerts option to access cacerts keystore

Enter keystore password:
Owner: CN=*.alfresco.com, O=Hyland Software, L=Westlake, ST=Ohio, C=US Issuer: CN=Entrust Certification Authority - L1K, OU="(c) 2012 Entrust, Inc. - for authorized use only", OU=See www.entrust.net/legal-terms, O="Entrust, Inc.", C=US Serial number: 3054263214bb29f7fe01cd0b8984c73f Valid from: Thu Jul 15 09:10:47 EDT 2021 until: Fri Jul 15 09:10:47 EDT 2022 Certificate fingerprints: SHA1: E7:15:72:3E:C3:86:A7:D3:24:74:11:29:3B:AC:9D:FC:11:B6:66:99 SHA256: F4:1A:E3:1E:24:D6:A7:27:BD:F3:08:52:A0:7B:54:A6:E3:1E:3F:40:FA:7E:9C:6E:1F:34:38:6B:26:32:70:77 Signature algorithm name: SHA256withRSA Subject Public Key Algorithm: 2048-bit RSA key Version: 3 Extensions: #1: ObjectId: 1.3.6.1.4.1.11129.2.4.2 Criticality=false 0000: 04 82 01 6C 01 6A 00 77 00 56 14 06 9A 2F D7 C2 ...l.j.w.V.../.. 0010: EC D3 F5 E1 BD 44 B2 3E C7 46 76 B9 BC 99 11 5C .....D.>.Fv....\ 0020: C0 EF 94 98 55 D6 89 D0 DD 00 00 01 7A AA 4A 85 ....U.......z.J. 0030: B4 00 00 04 03 00 48 30 46 02 21 00 B9 E1 7E B6 ......H0F.!..... 0040: A6 05 68 06 3C CB 42 32 1B 78 23 EA 6A 41 A4 94 ..h.<.B2.x#.jA.. 0050: 89 FC 16 3A 4C ED AA 60 55 45 36 83 02 21 00 FB ...:L..`UE6..!.. 0060: F2 42 5D 61 C9 C1 88 5C 7C D3 12 80 9B 93 11 55 .B]a...\.......U 0070: DD 84 ED 0F C1 CF 25 11 07 AE 26 09 5C 15 A4 00 ......%...&.\... 0080: 77 00 DF A5 5E AB 68 82 4F 1F 6C AD EE B8 5F 4E w...^.h.O.l..._N 0090: 3E 5A EA CD A2 12 A4 6A 5E 8E 3B 12 C0 20 44 5C >Z.....j^.;.. D\ 00A0: 2A 73 00 00 01 7A AA 4A 85 A6 00 00 04 03 00 48 *s...z.J.......H 00B0: 30 46 02 21 00 EE FC F7 90 73 B5 CC DF E8 9D BE 0F.!.....s...... 00C0: 6F 0E D0 27 4F 04 6D 2F 07 4A A1 1D AF 0C BE DB o..'O.m/.J...... 00D0: C4 50 07 EA 0D 02 21 00 87 2E 38 7D 93 D1 73 83 .P....!...8...s. 00E0: 56 8B AA 27 45 B2 7B CA 8B 3B 78 48 41 FD 50 3A V..'E....;xHA.P: 00F0: 49 E2 DF DD B8 26 62 DF 00 76 00 46 A5 55 EB 75 I....&b..v.F.U.u 0100: FA 91 20 30 B5 A2 89 69 F4 F3 7D 11 2C 41 74 BE .. 0...i....,At. 0110: FD 49 B8 85 AB F2 FC 70 FE 6D 47 00 00 01 7A AA .I.....p.mG...z. 0120: 4A 85 AF 00 00 04 03 00 47 30 45 02 21 00 EC 51 J.......G0E.!..Q 0130: 6C 39 5B 7F A2 A5 98 61 83 38 4A E3 9F 88 94 22 l9[....a.8J...." 0140: 97 88 4F 58 2A 85 96 0F 7B 37 67 62 17 1A 02 20 ..OX*....7gb... 0150: 55 87 19 A2 50 31 5D B5 38 BF B3 10 92 18 84 0D U...P1].8....... 0160: B3 19 A5 DB 25 5F 96 00 1F 4C 85 1A 61 58 22 8C ....%_...L..aX". #2: ObjectId: 1.3.6.1.5.5.7.1.1 Criticality=false AuthorityInfoAccess [ [ accessMethod: ocsp accessLocation: URIName: http://ocsp.entrust.net , accessMethod: caIssuers accessLocation: URIName: http://aia.entrust.net/l1k-chain256.cer ] ] #3: ObjectId: 2.5.29.35 Criticality=false AuthorityKeyIdentifier [ KeyIdentifier [ 0000: 82 A2 70 74 DD BC 53 3F CF 7B D4 F7 CD 7F A7 60 ..pt..S?.......` 0010: C6 0A 4C BF ..L. ] ] #4: ObjectId: 2.5.29.19 Criticality=true BasicConstraints:[ CA:false PathLen: undefined ] #5: ObjectId: 2.5.29.31 Criticality=false CRLDistributionPoints [ [DistributionPoint: [URIName: http://crl.entrust.net/level1k.crl] ]] #6: ObjectId: 2.5.29.32 Criticality=false CertificatePolicies [ [CertificatePolicyId: [2.16.840.1.114028.10.1.5] [PolicyQualifierInfo: [ qualifierID: 1.3.6.1.5.5.7.2.1 qualifier: 0000: 16 1B 68 74 74 70 73 3A 2F 2F 77 77 77 2E 65 6E ..https://www.en 0010: 74 72 75 73 74 2E 6E 65 74 2F 72 70 61 trust.net/rpa ]] ] [CertificatePolicyId: [2.23.140.1.2.2] [] ] ] #7: ObjectId: 2.5.29.37 Criticality=false ExtendedKeyUsages [ serverAuth clientAuth ] #8: ObjectId: 2.5.29.15 Criticality=true KeyUsage [ DigitalSignature Key_Encipherment ] #9: ObjectId: 2.5.29.17 Criticality=false SubjectAlternativeName [ DNSName: *.alfresco.com DNSName: alfresco.com ] #10: ObjectId: 2.5.29.14 Criticality=false SubjectKeyIdentifier [ KeyIdentifier [ 0000: C8 2D 66 9E B1 68 76 ED AE C8 05 59 07 E5 6A 9F .-f..hv....Y..j. 0010: C5 85 38 4A ..8J ] ] Trust this certificate? [no]: yes Certificate was added to keystore

 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

View solution in original post

6 Replies
abhinavmishra14
Advanced

Re: Alfresco auth-rest SDK of ACS gives the error while downloading artifacts

Jump to solution

Checkout these threads:

https://hub.alfresco.com/t5/alfresco-content-services-forum/ssl-certificate-expired-on-https-artifac...

https://hub.alfresco.com/t5/alfresco-content-services-forum/cannot-build-an-alfresco-sdk-4-2-project...

It SSL certificate for https://artifacts.alfresco.com was expired. but now it is renewed. 

It does download the jar files during build correctly now.

https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/org/alfresco/alfresco-auth-rest...

Can you share the full build log, it should point out to some artifacts? 

something like: 

[ERROR] Non-resolvable import POM: Could not transfer artifact org.alfresco:....................

 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
om_bijawat
Member II

Re: Alfresco auth-rest SDK of ACS gives the error while downloading artifacts

Jump to solution

Plase see below the full build log : 

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.alresco.poc:ClientPOC:0.0.1-SNAPSHOT: org.alfresco:alfresco-java-sdkSmiley Tongueom:5.0.4 was not found in https://artifacts.alfresco.com/nexus/content/groups/public during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of alfresco-public has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 6, column 14
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.alresco.poc:ClientPOC:0.0.1-SNAPSHOT (D:\workspace\ClientPOC\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for com.alresco.poc:ClientPOC:0.0.1-SNAPSHOT: org.alfresco:alfresco-java-sdkSmiley Tongueom:5.0.4 was not found in https://artifacts.alfresco.com/nexus/content/groups/public during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of alfresco-public has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 6, column 14 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

om_bijawat
Member II

Re: Alfresco auth-rest SDK of ACS gives the error while downloading artifacts

Jump to solution

Even I faced the same issue with alfresco-java-rest-api artifacts also, please see the details below :

[ERROR] Failed to execute goal on project ClientPOC: Could not resolve dependencies for project com.alresco.poc:ClientPOC:jar:0.0.1-SNAPSHOT: Could not transfer artifact org.alfresco:alfresco-java-rest-api:jar:5.0.3-SNAPSHOT from/to alfresco-public (https://artifacts.alfresco.com/nexus/content/groups/public): transfer failed for https://artifacts.alfresco.com/nexus/content/groups/public/org/alfresco/alfresco-java-rest-api/5.0.3...: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]

Thanks

abhinavmishra14
Advanced

Re: Alfresco auth-rest SDK of ACS gives the error while downloading artifacts

Jump to solution

Try this and see if it works for you:

https://github.com/abhinavmishra14/InstallCert#readme 

java InstallCert artifacts.alfresco.com:443

All the instructions are documented on the github repo.

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
om_bijawat
Member II

Re: Alfresco auth-rest SDK of ACS gives the error while downloading artifacts

Jump to solution

Issue still persist, even after installing the certificates

Please find below my pom.xml, let me know if I have added the dependencies correctly or not:

 

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<!-- Alfresco Java SDK 5 Parent -->
     <parent>
         <groupId>org.alfresco</groupId>
         <artifactId>alfresco-java-sdk</artifactId>
         <version>5.0.3-SNAPSHOT</version>
     </parent>
	<groupId>com.alresco.poc</groupId>
	<artifactId>ClientPOC</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<name>ClientPOC</name>
	<description>Demo project for Spring Boot</description>
	<properties>
		<java.version>11</java.version>
	</properties>

	<repositories>
		<repository>
			<id>alfresco-public</id>
			<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
		<repository>
			<id>alfresco-public-snapshots</id>
			<url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>
	<pluginRepositories>
		<pluginRepository>
			<id>alfresco-public-snapshots</id>
			<url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</pluginRepository>
	</pluginRepositories>

	<dependencies>
		 <dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter</artifactId>
		</dependency>
		 
       <dependency>
		    <groupId>org.alfresco</groupId>
		    <artifactId>alfresco-java-rest-api</artifactId>
		    <version>5.0.3-SNAPSHOT</version>
		</dependency>
	   
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>
</project>

Full exception which I am getting :

 

 

Spoiler

"C:\Program Files\Amazon Corretto\jdk11.0.12_7\bin\java.exe" -Dmaven.multiModuleProjectDirectory=D:\idea_workspace\ClientPOC "-Dmaven.home=C:\Program Files\apache-maven-3.8.1" "-Dclassworlds.conf=C:\Program Files\apache-maven-3.8.1\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3\lib\idea_rt.jar=53621:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\apache-maven-3.8.1\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\apache-maven-3.8.1\boot\plexus-classworlds.license" org.codehaus.classworlds.Launcher -Didea.version=2020.3 -s "C:\Program Files\apache-maven-3.8.1\conf\settings.xml" clean package -U -Dlicense.skip=true
[INFO] Scanning for projects...
Downloading from alfresco-public-snapshots: https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/org/alfresco/alfresco-java-sdk/...
[WARNING] Could not transfer metadata org.alfresco:alfresco-java-sdk:5.0.3-SNAPSHOT/maven-metadata.xml from/to alfresco-public-snapshots (https://artifacts.alfresco.com/nexus/content/groups/public-snapshots): transfer failed for https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/org/alfresco/alfresco-java-sdk/...
[WARNING] org.alfresco:alfresco-java-sdk:5.0.3-SNAPSHOT/maven-metadata.xmlfailed to transfer from https://artifacts.alfresco.com/nexus/content/groups/public-snapshots during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of alfresco-public-snapshots has elapsed or updates are forced. Original error: Could not transfer metadata org.alfresco:alfresco-java-sdk:5.0.3-SNAPSHOT/maven-metadata.xml from/to alfresco-public-snapshots (https://artifacts.alfresco.com/nexus/content/groups/public-snapshots): transfer failed for https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/org/alfresco/alfresco-java-sdk/...
Downloading from alfresco-private-repository: https://artifacts.alfresco.com/nexus/content/groups/private/org/alfresco/alfresco-java-sdk/5.0.3-SNA...
[WARNING] Could not transfer metadata org.alfresco:alfresco-java-sdk:5.0.3-SNAPSHOT/maven-metadata.xml from/to alfresco-private-repository (https://artifacts.alfresco.com/nexus/content/groups/private): transfer failed for https://artifacts.alfresco.com/nexus/content/groups/private/org/alfresco/alfresco-java-sdk/5.0.3-SNA...
[INFO]
[INFO] ---------------------< com.alresco.poc:ClientPOC >----------------------
[INFO] Building ClientPOC 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from alfresco-private-repository: https://artifacts.alfresco.com/nexus/content/groups/private/org/alfresco/alfresco-java-rest-api/5.0....
Downloading from alfresco-public-snapshots: https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/org/alfresco/alfresco-java-rest...
[WARNING] Could not transfer metadata org.alfresco:alfresco-java-rest-api:5.0.3-SNAPSHOT/maven-metadata.xml from/to alfresco-public-snapshots (https://artifacts.alfresco.com/nexus/content/groups/public-snapshots): transfer failed for https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/org/alfresco/alfresco-java-rest...
[WARNING] Could not transfer metadata org.alfresco:alfresco-java-rest-api:5.0.3-SNAPSHOT/maven-metadata.xml from/to alfresco-private-repository (https://artifacts.alfresco.com/nexus/content/groups/private): transfer failed for https://artifacts.alfresco.com/nexus/content/groups/private/org/alfresco/alfresco-java-rest-api/5.0....
[WARNING] org.alfresco:alfresco-java-rest-api:5.0.3-SNAPSHOT/maven-metadata.xmlfailed to transfer from https://artifacts.alfresco.com/nexus/content/groups/public-snapshots during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of alfresco-public-snapshots has elapsed or updates are forced. Original error: Could not transfer metadata org.alfresco:alfresco-java-rest-api:5.0.3-SNAPSHOT/maven-metadata.xml from/to alfresco-public-snapshots (https://artifacts.alfresco.com/nexus/content/groups/public-snapshots): transfer failed for https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/org/alfresco/alfresco-java-rest...
[WARNING] org.alfresco:alfresco-java-rest-api:5.0.3-SNAPSHOT/maven-metadata.xmlfailed to transfer from https://artifacts.alfresco.com/nexus/content/groups/private during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of alfresco-private-repository has elapsed or updates are forced. Original error: Could not transfer metadata org.alfresco:alfresco-java-rest-api:5.0.3-SNAPSHOT/maven-metadata.xml from/to alfresco-private-repository (https://artifacts.alfresco.com/nexus/content/groups/private): transfer failed for https://artifacts.alfresco.com/nexus/content/groups/private/org/alfresco/alfresco-java-rest-api/5.0....
[WARNING] org.alfresco:alfresco-java-sdk:5.0.3-SNAPSHOT/maven-metadata.xmlfailed to transfer from https://artifacts.alfresco.com/nexus/content/groups/public-snapshots during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of alfresco-public-snapshots has elapsed or updates are forced. Original error: Could not transfer metadata org.alfresco:alfresco-java-sdk:5.0.3-SNAPSHOT/maven-metadata.xml from/to alfresco-public-snapshots (https://artifacts.alfresco.com/nexus/content/groups/public-snapshots): transfer failed for https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/org/alfresco/alfresco-java-sdk/...
[WARNING] org.alfresco:alfresco-java-sdk:5.0.3-SNAPSHOT/maven-metadata.xmlfailed to transfer from https://artifacts.alfresco.com/nexus/content/groups/private during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of alfresco-private-repository has elapsed or updates are forced. Original error: Could not transfer metadata org.alfresco:alfresco-java-sdk:5.0.3-SNAPSHOT/maven-metadata.xml from/to alfresco-private-repository (https://artifacts.alfresco.com/nexus/content/groups/private): transfer failed for https://artifacts.alfresco.com/nexus/content/groups/private/org/alfresco/alfresco-java-sdk/5.0.3-SNA...
Downloading from alfresco-public-snapshots: https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/org/alfresco/alfresco-java-rest...
Downloading from alfresco-private-repository: https://artifacts.alfresco.com/nexus/content/groups/private/org/alfresco/alfresco-java-rest-api/5.0....
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.507 s
[INFO] Finished at: 2021-09-09T22:58:16+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project ClientPOC: Could not resolve dependencies for project com.alresco.poc:ClientPOC:jar:0.0.1-SNAPSHOT: Could not transfer artifact org.alfresco:alfresco-java-rest-api:jar:5.0.3-SNAPSHOT from/to alfresco-public-snapshots (https://artifacts.alfresco.com/nexus/content/groups/public-snapshots): transfer failed for https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/org/alfresco/alfresco-java-rest...: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Process finished with exit code 1

 Thanks,

Om Prakash

 

abhinavmishra14
Advanced

Re: Alfresco auth-rest SDK of ACS gives the error while downloading artifacts

Jump to solution

Pom file doesn't seem to have an issue, it is related to the certificate installed on your local environment. Unless you resolve it, it wont work. 

Did you installed the alfresco certificate correctly to your java11 installation path, e.g if using jdk-11.0.4.: C:\Program Files\Java\jdk-11.0.4\lib\security\cacerts (C:\Program Files\Java\jdk-11.x.x\lib\security\cacerts) ?

Additionally you can open the url https://artifacts.alfresco.com/nexus/content/groups/public/ in browser and see if certificate is valid:

browser validity.pngCERTIFICATE-VALID.pngcopy-to-file.png

 

 

save file.png

After you save the file, launch a command prompt. Open the command prompt as administrator and navigate to the folder where you saved the certificate: e.g.: C:\Users\alfresco222User\Desktop (File is available as C:\Users\alfresco222User\Desktop\alf-pub-repo-cert.cer)

Run the following command to install the cert, default password is "changeit" and provide "yes" when prompted:

C:\Users\alfresco222User\Desktop>keytool -import -alias alf-pub-repo-cert -keystore "C:\Program Files\Java\jdk-11.0.4\lib\security\cacerts" -file alf-pub-repo-cert.cer
Warning: use -cacerts option to access cacerts keystore

Enter keystore password:
Owner: CN=*.alfresco.com, O=Hyland Software, L=Westlake, ST=Ohio, C=US Issuer: CN=Entrust Certification Authority - L1K, OU="(c) 2012 Entrust, Inc. - for authorized use only", OU=See www.entrust.net/legal-terms, O="Entrust, Inc.", C=US Serial number: 3054263214bb29f7fe01cd0b8984c73f Valid from: Thu Jul 15 09:10:47 EDT 2021 until: Fri Jul 15 09:10:47 EDT 2022 Certificate fingerprints: SHA1: E7:15:72:3E:C3:86:A7:D3:24:74:11:29:3B:AC:9D:FC:11:B6:66:99 SHA256: F4:1A:E3:1E:24:D6:A7:27:BD:F3:08:52:A0:7B:54:A6:E3:1E:3F:40:FA:7E:9C:6E:1F:34:38:6B:26:32:70:77 Signature algorithm name: SHA256withRSA Subject Public Key Algorithm: 2048-bit RSA key Version: 3 Extensions: #1: ObjectId: 1.3.6.1.4.1.11129.2.4.2 Criticality=false 0000: 04 82 01 6C 01 6A 00 77 00 56 14 06 9A 2F D7 C2 ...l.j.w.V.../.. 0010: EC D3 F5 E1 BD 44 B2 3E C7 46 76 B9 BC 99 11 5C .....D.>.Fv....\ 0020: C0 EF 94 98 55 D6 89 D0 DD 00 00 01 7A AA 4A 85 ....U.......z.J. 0030: B4 00 00 04 03 00 48 30 46 02 21 00 B9 E1 7E B6 ......H0F.!..... 0040: A6 05 68 06 3C CB 42 32 1B 78 23 EA 6A 41 A4 94 ..h.<.B2.x#.jA.. 0050: 89 FC 16 3A 4C ED AA 60 55 45 36 83 02 21 00 FB ...:L..`UE6..!.. 0060: F2 42 5D 61 C9 C1 88 5C 7C D3 12 80 9B 93 11 55 .B]a...\.......U 0070: DD 84 ED 0F C1 CF 25 11 07 AE 26 09 5C 15 A4 00 ......%...&.\... 0080: 77 00 DF A5 5E AB 68 82 4F 1F 6C AD EE B8 5F 4E w...^.h.O.l..._N 0090: 3E 5A EA CD A2 12 A4 6A 5E 8E 3B 12 C0 20 44 5C >Z.....j^.;.. D\ 00A0: 2A 73 00 00 01 7A AA 4A 85 A6 00 00 04 03 00 48 *s...z.J.......H 00B0: 30 46 02 21 00 EE FC F7 90 73 B5 CC DF E8 9D BE 0F.!.....s...... 00C0: 6F 0E D0 27 4F 04 6D 2F 07 4A A1 1D AF 0C BE DB o..'O.m/.J...... 00D0: C4 50 07 EA 0D 02 21 00 87 2E 38 7D 93 D1 73 83 .P....!...8...s. 00E0: 56 8B AA 27 45 B2 7B CA 8B 3B 78 48 41 FD 50 3A V..'E....;xHA.P: 00F0: 49 E2 DF DD B8 26 62 DF 00 76 00 46 A5 55 EB 75 I....&b..v.F.U.u 0100: FA 91 20 30 B5 A2 89 69 F4 F3 7D 11 2C 41 74 BE .. 0...i....,At. 0110: FD 49 B8 85 AB F2 FC 70 FE 6D 47 00 00 01 7A AA .I.....p.mG...z. 0120: 4A 85 AF 00 00 04 03 00 47 30 45 02 21 00 EC 51 J.......G0E.!..Q 0130: 6C 39 5B 7F A2 A5 98 61 83 38 4A E3 9F 88 94 22 l9[....a.8J...." 0140: 97 88 4F 58 2A 85 96 0F 7B 37 67 62 17 1A 02 20 ..OX*....7gb... 0150: 55 87 19 A2 50 31 5D B5 38 BF B3 10 92 18 84 0D U...P1].8....... 0160: B3 19 A5 DB 25 5F 96 00 1F 4C 85 1A 61 58 22 8C ....%_...L..aX". #2: ObjectId: 1.3.6.1.5.5.7.1.1 Criticality=false AuthorityInfoAccess [ [ accessMethod: ocsp accessLocation: URIName: http://ocsp.entrust.net , accessMethod: caIssuers accessLocation: URIName: http://aia.entrust.net/l1k-chain256.cer ] ] #3: ObjectId: 2.5.29.35 Criticality=false AuthorityKeyIdentifier [ KeyIdentifier [ 0000: 82 A2 70 74 DD BC 53 3F CF 7B D4 F7 CD 7F A7 60 ..pt..S?.......` 0010: C6 0A 4C BF ..L. ] ] #4: ObjectId: 2.5.29.19 Criticality=true BasicConstraints:[ CA:false PathLen: undefined ] #5: ObjectId: 2.5.29.31 Criticality=false CRLDistributionPoints [ [DistributionPoint: [URIName: http://crl.entrust.net/level1k.crl] ]] #6: ObjectId: 2.5.29.32 Criticality=false CertificatePolicies [ [CertificatePolicyId: [2.16.840.1.114028.10.1.5] [PolicyQualifierInfo: [ qualifierID: 1.3.6.1.5.5.7.2.1 qualifier: 0000: 16 1B 68 74 74 70 73 3A 2F 2F 77 77 77 2E 65 6E ..https://www.en 0010: 74 72 75 73 74 2E 6E 65 74 2F 72 70 61 trust.net/rpa ]] ] [CertificatePolicyId: [2.23.140.1.2.2] [] ] ] #7: ObjectId: 2.5.29.37 Criticality=false ExtendedKeyUsages [ serverAuth clientAuth ] #8: ObjectId: 2.5.29.15 Criticality=true KeyUsage [ DigitalSignature Key_Encipherment ] #9: ObjectId: 2.5.29.17 Criticality=false SubjectAlternativeName [ DNSName: *.alfresco.com DNSName: alfresco.com ] #10: ObjectId: 2.5.29.14 Criticality=false SubjectKeyIdentifier [ KeyIdentifier [ 0000: C8 2D 66 9E B1 68 76 ED AE C8 05 59 07 E5 6A 9F .-f..hv....Y..j. 0010: C5 85 38 4A ..8J ] ] Trust this certificate? [no]: yes Certificate was added to keystore

 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)