Sonarqube-scan-action gpg check not working on windows runner

The Action v8.2.1 is not working on Windows Runners.

GPG Check Fails because key path is in linux style and not windows.

"C:\Program Files (x86)\GnuPG\bin\gpg.exe" --homedir /r/GHEC/Build_B1/_temp/gpg-957091c8 --batch --keyserver hkps://keyserver.ubuntu.com --keyserver-options http-proxy=*** --recv-keys 679F1EE92B19609DE816FDE81DB198F93525EC1A

gpg: Schlüsselblockhilfsmittel`/r/GHEC/RSG_B1/_temp/gpg-957091c8/pubring.kbx': No such file or directory

gpg: can't create '/r/GHEC/Build_B1/_temp/gpg-957091c8/gnupg_spawn_dirmngr_sentinel.lock': The system cannot find the path specified.

gpg: can't connect to the dirmngr: No such file or directory

gpg: Empfangen vom Schlüsselserver fehlgeschlagen: Kein Dirmngr

Path should be R:/GHEC/Build_B1/_temp/gpg-957091c8

Hi @ArminPrieschl,

Could you help me to create a GitHub forkflow file to reproduce this bug?

Before fixing this bug, I want to reproduce it. My understanding is the bug does not happen with the Git-for-Windows build of GPG, but only with the native GnuPG (Gpg4win) Claude investigation. So I try to install the native version of gnupg but fail.

When I try to install it, the package manager successfully downloads gnupg but then freezes during the installation:

  • “choco install gnupg -y --no-progress” freezes after “Installing gnupg…” here

  • “winget install --id GnuPG.GnuPG --exact --accept-source-agreements --accept-package-agreements --disable-interactivity” freezes after “Starting package install…” here

Perhaps the gnupg installation opens a graphic dialog box waiting for user interaction.

How did you install gnupg in your context?

Alban

Hi @alban.auzeill

using a SelfHosted Runner on a OnPremise Windows Server.

Workflow is simply calling the action

      - name: SonarQube Scan Action
        uses: SonarSource/sonarqube-scan-action@22918119ff8e1ca75a623e15c8296b6ea4fbe28f # v8.2.1
        env:
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
          SONAR_HOST_URL: ${{ inputs.SONAR_URL }}
          HTTP_PROXY: ${{ env.HTTP_PROXY }}
          HTTPS_PROXY: ${{ env.HTTPS_PROXY }}
        with:
          args: ${{ env.SONAR_ARGS }}

gpg is globally installed on this server.

Source: Gpg4win - Download Gpg4win