kotlinmavennexus

Read timeout while trying to download package


I have an issue while building kotlin app. I'm using gitlab ci/cd to build it.

settings.gradle.kts repos' file config:

pluginManagement {
    repositories {
        maven("repo1")
        maven("repo2")
    }
}

When I build the app i get

Could not resolve org.jetbrains.kotlin:kotlin-parcelize-runtime:2.2.0.
[...]
>Read timed out

Although when I curl the package inside the same pipeline step it shows the .pom file.

What could be the reason for the time-outs?


Solution

  • I managed to solve it. For reason still unknown gradle didn't respect no_proxy environment variable and tried to download the packages through proxy.

    To solve it I passed following gradle options to my pipeline:

    GRADLE_OPTS: >-
          -Dhttps.nonProxyHosts
          -Dhttp.nonProxyHosts