# Sonarqube-scan-action fails to fetch public key from keyserver when https proxy is required

**URL:** <https://community.sonarsource.com/t/sonarqube-scan-action-fails-to-fetch-public-key-from-keyserver-when-https-proxy-is-required/188223>\
**Category:** SonarQube Server / Community Build\
**Tags:** github-actions\
**Created:** [September 14, 2026, 9:56am UTC](https://community.sonarsource.com/t/sonarqube-scan-action-fails-to-fetch-public-key-from-keyserver-when-https-proxy-is-required/188223 "2026-09-14T09:56:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Torbjorn-Svensson](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@Torbjorn-Svensson](https://community.sonarsource.com/u/Torbjorn-Svensson)\
**Post date:** [September 14, 2026, 9:56am UTC](https://community.sonarsource.com/t/sonarqube-scan-action-fails-to-fetch-public-key-from-keyserver-when-https-proxy-is-required/188223/1 "2026-09-14T09:56:34Z")

</div>

When running the sonarqube-scan-action action in an environment where the only way out on the Internet is through a proxy server, the downloading of the public key for GPG verification fails.

I’ve reported the problem to the GPG maintainers in [[PATCH GnuPG] dirmngr: Fix HKP keyserver access via HTTP proxy](https://lists.gnupg.org/pipermail/gnupg-devel/2026-September/036393.html).

SonarQube server: 2026.4.1  
sonarqube-scan-action: v7.2.0 or later

I can provide the error message if needed, but I think that the above should make it clear what is the problem.

---

<div class="post-metadata">

**Author:** ![Torbjorn-Svensson](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@Torbjorn-Svensson](https://community.sonarsource.com/u/Torbjorn-Svensson)\
**Post date:** [September 14, 2026, 10:08am UTC](https://community.sonarsource.com/t/sonarqube-scan-action-fails-to-fetch-public-key-from-keyserver-when-https-proxy-is-required/188223/2 "2026-09-14T10:08:13Z")

</div>

I’ve opened [Fix GPG key retrieval through HTTPS proxies by Torbjorn-Svensson · Pull Request #265 · SonarSource/sonarqube-scan-action · GitHub](https://github.com/SonarSource/sonarqube-scan-action/pull/265) as a possible work around for the problem.

---

<div class="post-metadata">

**Author:** ![andres](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/andres/32/76342_2.png) [@andres](https://community.sonarsource.com/u/andres)\
**Post date:** [September 18, 2026, 3:19pm UTC](https://community.sonarsource.com/t/sonarqube-scan-action-fails-to-fetch-public-key-from-keyserver-when-https-proxy-is-required/188223/3 "2026-09-18T15:19:38Z")

</div>

Hey @Torbjorn-Svensson, thanks for the deep dive into the issue! I will flag this for the team.

---

<div class="post-metadata">

**Author:** ![sebastian.zumbrunn](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/sebastian.zumbrunn/32/64172_2.png) [@sebastian.zumbrunn](https://community.sonarsource.com/u/sebastian.zumbrunn)\
**Post date:** [September 23, 2026, 3:47pm UTC](https://community.sonarsource.com/t/sonarqube-scan-action-fails-to-fetch-public-key-from-keyserver-when-https-proxy-is-required/188223/6 "2026-09-23T15:47:49Z")

</div>

Hey @Torbjorn-Svensson,

Thanks for reaching out and thanks for the PR.

For me to understand your issue a bit better, do you have a workaround on your end or does this bug block you completely?

On the PR itself, principally the PR seems good. The new verifying logic seems a bit brittle to me, and as such, I’m hesitant merging it. That being said, I don’t really have a better solution. I’ll leave a separate review on the PR.

Best,  
Sebastian Zumbrunn

---

<div class="post-metadata">

**Author:** ![Torbjorn-Svensson](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@Torbjorn-Svensson](https://community.sonarsource.com/u/Torbjorn-Svensson)\
**Post date:** [September 28, 2026, 3:26pm UTC](https://community.sonarsource.com/t/sonarqube-scan-action-fails-to-fetch-public-key-from-keyserver-when-https-proxy-is-required/188223/7 "2026-09-28T15:26:19Z")

</div>

Sorry for the late response.

The only solution that I have currently is to replace “gpg” on $PATH to be a script that would check the arguments and override to do the sequence that was put in the PR to the action.

Since that fix is even more hackish than fixing it in the action, I have, for now disable verification, but will as soon as there is a tag publicly available, switch to it and enable it again.

While I did the above PR, I noticed that the keyserver is not configurable from the workflows. Is this something you would like me to contribute or something that would be easier for your developers to handle internally? (just provide an option to the action.yml)

---

<div class="post-metadata">

**Author:** ![sebastian.zumbrunn](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/sebastian.zumbrunn/32/64172_2.png) [@sebastian.zumbrunn](https://community.sonarsource.com/u/sebastian.zumbrunn)\
**Post date:** [September 29, 2026, 7:09am UTC](https://community.sonarsource.com/t/sonarqube-scan-action-fails-to-fetch-public-key-from-keyserver-when-https-proxy-is-required/188223/8 "2026-09-29T07:09:25Z")

</div>

Hey @Torbjorn-Svensson,

Making the keyserver configurable isn’t currently on our roadmap. Is this something you need? If yes, what is your use case?

Regarding your current PR, it has been merged and I’m planning to create a release soon.

Best,  
Sebastian Zumbrunn

---

<div class="post-metadata">

**Author:** ![sebastian.zumbrunn](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/sebastian.zumbrunn/32/64172_2.png) [@sebastian.zumbrunn](https://community.sonarsource.com/u/sebastian.zumbrunn)\
**Post date:** [September 30, 2026, 1:42pm UTC](https://community.sonarsource.com/t/sonarqube-scan-action-fails-to-fetch-public-key-from-keyserver-when-https-proxy-is-required/188223/10 "2026-09-30T13:42:26Z")

</div>

Hey y’all,

@Torbjorn-Svensson’s PR has been merged and released as part of version `v8.3.0` with the commit hash `d209202bc7d53ff1cc128f7f907dac145c9d6ae9`.

Best,  
Sebastian Zumbrunn
