Failed to install GPG key: Key must be a single key, not multiple.
Metadata
Current evaluation
Craft-archives upgrade in snapcraft PR #4253 (commit a311e7c) restored multi-key APT GPG parsing for package-repositories; tracked as CRAFT-1827 and merged into hotfix/7.5, shipped in Snapcraft 7.4.4.
Resolution: closed resolved
Reason: A craft-archives dependency update merged as PR #4253 (commit a311e7c) into the hotfix/7.5 branch, fixing the multi-key AptGPGKeyInstallError regression reported in 7.4.3; the Launchpad bug was closed referencing that PR. Same root cause as canonical/snapcraft#4224.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Snapcraft version 7.4.3, Rev 9362
While attempting to build a snap, it fails almost immediately with the error "Failed to install GPG key: Key must be a single key, not multiple.". Attempting to send error data when prompted results in: "Encountered an issue while trying to submit the report: unhashable type: 'AptGPGKeyInstallError'" and a suggestion to post here.
The problem seems to be when including puppet bolt via the "package-repositories" directive and an associated .asc key file. Presumably there is something in the key that snapcraft cannot parse any more.
This issue looks like it has been reported elsewhere at https://forum.snapcraft.io/t/issue-with-gpg-key/35675/9 and https://github.com/snapcore/snapcraft/issues/4224, but I thought I'd add it here because the "report error data?" prompt asked me to.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Craft-archives upgrade in snapcraft PR #4253 (commit a311e7c) restored multi-key APT GPG parsing for package-repositories; tracked as CRAFT-1827 and merged into hotfix/7.5, shipped in Snapcraft 7.4.4. | |
| stealth/space-bunny-alpha | — | closed resolved | Multi-key apt GPG parsing was fixed by canonical/snapcraft#4253 (commit a311e7c), updating craft-archives; the change merged into the 7.5 hotfix. | |
| qwen/qwen3.6-35b-a3b | — | — | Snapcraft failed to install GPG keys when multiple keys were bundled in a single file during package-repositories setup. Fixed and merged via pull request #4253, restoring multi-key apt repository support. | |
| qwen3.6-35b-a3b-mtp-q6 |
Impact:
20
Quick Win:
17
Staleness:
95
Complexity:
15
Confidence:
90
Support Request:
10
|
close not a bug | GPG key installation fails with 'Key must be a single key, not multiple' when using package-repositories directive. Duplicate of #4224 which was fixed via PR #4241. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
95
Complexity:
65
Confidence:
90
Support Request:
10
|
needs triage | Snapcraft build fails with GPG key error when using package-repositories directive. Unlabeled, no maintainer response, inactive for ~3 years. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
95
Complexity:
30
Confidence:
85
Support Request:
10
|
close stale | Snapcraft 7.4.3 build fails with a GPG key parsing error when using the package-repositories directive. Unlabelled, zero comments, inactive for over three years. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
95
Complexity:
40
Confidence:
75
Support Request:
20
|
close stale | Snapcraft build fails when installing a GPG key via package-repositories, citing multiple keys in the file. Unlabelled, zero comments, inactive for ~3 years. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
canonical/snapcraft#4253
(confidence 97%)
Merged PR updating craft-archives to support multiple APT keys; commit a311e7c on hotfix/7.5.
-
Duplicate Of:
canonical/snapcraft#4224
(confidence 92%)
Same AptGPGKeyInstallError regression, closed by #4253; author also linked forum report.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4224 Regression: snapcraft started failing with craft_archives.repo.errors.AptGPGKeyInstallError | snapcraft | closed | Multi-key APT GPG parsing regression was fixed by merged PR #4253 (a311e7c), updating craft-archives and shipping in the Snapcraft 7.4.4 hotfix. | |
| #4253 package-repositories: update craft-archives to support multi-keys. | snapcraft | merged | Merged into hotfix/7.5 as a311e7c, updating craft-archives so package repositories support multiple keys. | |
| #4241 Hotfix/7.5 gpg multi keys | snapcraft | closed | Closed in favor of #4253, which updated craft-archives for multi-key package repositories and merged into hotfix/7.5 as a311e7c. |