jitci icon indicating copy to clipboard operation
jitci copied to clipboard

jitci failing with gradle 7.1 due to local cache using http

Open akoehn opened this issue 3 years ago • 3 comments

Gradle started requiring https connections for maven repositories; jitci uses http://cache without marking it as an allowed insecure repository.

The log states:

Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'cache(http://cache)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/7.1/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details.

Example: https://jitci.com/gh/minecraft-saar/minecraft-nlg/119

akoehn avatar Jul 08 '21 14:07 akoehn

@akoehn Did you find a workaround? I have the same issue with JitPack but can't find a way to circumvent it in my build.gradle

https://jitpack.io/com/github/readium/r2-navigator-kotlin/upgrade-gradle-2.0.0-g8d72a08-22/build.log

35.	------------------------------------------------------------
36.	Gradle 7.1.1
37.	------------------------------------------------------------
38.	
39.	Build time:   2021-07-02 12:16:43 UTC
40.	Revision:     774525a055494e0ece39f522ac7ad17498ce032c
41.	
42.	Kotlin:       1.4.31
43.	Groovy:       3.0.7
44.	Ant:          Apache Ant(TM) version 1.10.9 compiled on September 27 2020
45.	JVM:          1.8.0_212 (Oracle Corporation 25.212-b03)
46.	OS:           Linux 4.18.0-13-generic amd64
47.	
48.	00:06 $ ./gradlew listDeps -I ../deps.gradle
49.	Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
50.	Starting a Gradle Daemon (subsequent builds will be faster)
51.	Configuration on demand is an incubating feature.
52.	
53.	FAILURE: Build failed with an exception.
54.	
55.	* What went wrong:
56.	A problem occurred configuring root project 'r2-navigator-kotlin'.
57.	> Could not resolve all dependencies for configuration ':classpath'.
58.	   > Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'cache(http://cache)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/7.1.1/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details. 
59.	

mickael-menu avatar Aug 11 '21 17:08 mickael-menu

I "solved" it by disabling JitCI altogether: Settings > Stop building button at the bottom. With this the JitPack build is successful. We're using GitHub actions for our CI and were not really using JitCI.

mickael-menu avatar Aug 12 '21 08:08 mickael-menu

Unchecking Settings > Commands > Init > Cache dependencies "solved" problem for me.

MJaroslav avatar Sep 10 '22 09:09 MJaroslav