jitpack / jitci

A CI with tests, coverage, dependency audit, license & vuln. checks
https://jitci.com
19 stars 5 forks source link

jitci failing with gradle 7.1 due to local cache using http #21

Open akoehn opened 3 years ago

akoehn commented 3 years ago

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

mickael-menu commented 3 years ago

@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 commented 3 years ago

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.

MJaroslav commented 2 years ago

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