Search code examples
githubgradleworkflowgradlewnexus3

Received fatal alert: protocol_version


I have the problem that when I build the project at my place no errors occur. However, when I do this through my configured GitHub workflow, the following error occurs:

Execution failed for task ':network-protocol:compileKotlin'.
> Could not resolve all files for configuration ':network-protocol:compileClasspath'.
   > Could not resolve de.bluebox.wolff:candle:1.0.0.
     Required by:
         project :network-protocol
      > Could not resolve de.bluebox.wolff:candle:1.0.0.
         > Could not get resource 'https://repo.spleef.eu/repository/spleef-public/de/bluebox/wolff/candle/1.0.0/candle-1.0.0.pom'.
            > Could not GET 'https://repo.spleef.eu/repository/spleef-public/de/bluebox/wolff/candle/1.0.0/candle-1.0.0.pom'.
               > Received fatal alert: protocol_version

The whole thing runs over a public nexus, which runs on my server. The server accepts TLSv1.2 and TLSv1.3 requests.

Workflow

name: Gradle CI

on: [push]

jobs:
  build:
    name: Test for ${{ matrix.java }}
    runs-on: ubuntu-latest

    strategy:
      matrix:
        java: [ 8, 9, 10, 11, 12, 13, 14 ]

    steps:
      - uses: actions/checkout@v2

      - name: Set up JDK ${{ matrix.java }}
        uses: actions/setup-java@v1
        with:
          java-version: ${{ matrix.java }}
          architecture: x64

      - name: Grant execute permission for gradlew
        run: chmod +x gradlew

      - name: Build with gradlew
        run: ./gradlew -Dhttps.protocols=TLSv1.2 build

Am I missing something or is it just my nexus?


Solution

  • According to the Qualys SSL tester, this server only supports TLS 1.3. That means that your older versions of Java, which support TLS 1.2, but not TLS 1.3, won't work.

    If you control that server, I'd suggest re-adding support for TLS 1.2. While TLS 1.3 is awesome, TLS 1.2 is still considered robust and secure and is a fine choice, so there's no reason to disable it right now. If you don't, you'll need to either work with the owners or find an alternative.