← Back to issue list

Fail to run snapcraft using a proxy

View original Github issue

Metadata

Project
snapcraft
Number
#5635
Type
issue
State
closed
Author
sergiocazzolato
Labels
Status: Triaged Type: Bug
Created
Updated
Closed

Current evaluation

Fixed via craft-archives#165. The proxy-related GPG keyserver failure in snapcraft was resolved, and the reporter confirmed the fix works. Closed as fixed.

Suggested action:

No scores available.

Issue body

### Bug Description I am trying to build snapd in the new PS7 environment where a proxy is used to connect to the keyring server and I get the following error: https://pastebin.canonical.com/p/RRv3dtmxHv/ ### To Reproduce Create a vm in PS7 environment Download snapd code Run snapcraft ### Environment Tried Snapcraft in destructive-mode and with lxd Fail in arm64 and amd64 ### snapcraft.yaml ```yaml https://github.com/canonical/snapd/blob/master/build-aux/snap/snapcraft.yaml ``` ### Relevant log output ```shell 2025-07-21 15:22:06.142 Executing command: ['gpg', '--batch', '--no-default-keyring', '--with-colons', '--keyring', 'gnupg-ring:/etc/apt/keyrings/craft-FC42E99D.gpg', '--homedir', '/tmp/tmpcsizdqmv', '--keyserver', 'keyserver.ubuntu.com', '--recv-keys', '78E1918602959B9C59103100F1831DDAFC42E99D'] 2025-07-21 15:22:46.367 Failed to install GPG key: 2025-07-21 15:22:46.372 Traceback (most recent call last): 2025-07-21 15:22:46.372 File "/snap/snapcraft/15370/lib/python3.12/site-packages/snapcraft/application.py", line 467, in main 2025-07-21 15:22:46.372 return app.run() 2025-07-21 15:22:46.372 ^^^^^^^^^ 2025-07-21 15:22:46.372 File "/snap/snapcraft/15370/lib/python3.12/site-packages/craft_application/application.py", line 615, in run 2025-07-21 15:22:46.372 return_code = self._run_inner() 2025-07-21 15:22:46.372 ^^^^^^^^^^^^^^^^^ 2025-07-21 15:22:46.372 File "/snap/snapcraft/15370/lib/python3.12/site-packages/snapcraft/application.py", line 178, in _run_inner 2025-07-21 15:22:46.372 return_code = super()._run_inner() 2025-07-21 15:22:46.372 ^^^^^^^^^^^^^^^^^^^^ 2025-07-21 15:22:46.372 File "/snap/snapcraft/15370/lib/python3.12/site-packages/craft_application/application.py", line 561, in _run_inner 2025-07-21 15:22:46.372 dispatcher = self._get_dispatcher() 2025-07-21 15:22:46.372 ^^^^^^^^^^^^^^^^^^^^^^ 2025-07-21 15:22:46.372 File "/snap/snapcraft/15370/lib/python3.12/site-packages/snapcraft/application.py", line 405, in _get_dispatcher 2025-07-21 15:22:46.372 self._check_for_classic_fallback() 2025-07-21 15:22:46.372 File "/snap/snapcraft/15370/lib/python3.12/site-packages/snapcraft/application.py", line 317, in _check_for_classic_fallback 2025-07-21 15:22:46.372 raise errors.ClassicFallback() 2025-07-21 15:22:46.372 snapcraft.errors.ClassicFallback ``` ### Additional context _No response_

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Fixed via craft-archives#165. The proxy-related GPG keyserver failure in snapcraft was resolved, and the reporter confirmed the fix works. Closed as fixed.
qwen/qwen3.6-35b-a3b Fixed via canonical/craft-archives#165. The proxy-related GPG key retrieval failure in snapcraft was resolved, and the reporter confirmed the fix works correctly.
qwen/qwen3.6-35b-a3b Resolved via canonical/craft-archives#165. The proxy-related GPG key retrieval failure in snapcraft was fixed, and the reporter verified the issue no longer occurs.
qwen/qwen3.6-35b-a3b Resolved via canonical/craft-archives#165. Proxy environments caused GPG keyserver timeouts, triggering a ClassicFallback error. The upstream craft-archives update fixed the connectivity issue, verified by the reporter.
qwen3.6-35b-a3b-mtp-q6 Resolved via a fix in craft-archives issue #165. The update corrects GPG key retrieval failures when snapcraft runs behind a proxy. The reporter verified the fix eliminates the error during builds.
qwen3.6-35b-a3b-mtp-q6 Fixed via canonical/craft-archives#165. Proxy-related GPG keyserver failures during snapcraft builds were resolved, and the reporter confirmed the fix works.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#4224 Regression: snapcraft started failing with craft_archives.repo.errors.AptGPGKeyInstallError snapcraft closed A snapcraft regression causing AptGPGKeyInstallError from multi-key files was fixed. Resolution updated key parsing logic, with a hotfix released in version 7.4.4 and merged via PR #4241. The issue is closed.
70%