← Back to issue list

snapcraft register-key fails

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1816524
Type
issue
State
open
Author
~muthiahn
Labels
Created
Updated
Closed

Current evaluation

snapcraft 2.43.1 register-key fails with GPG 'Operation cancelled' during snap export-key; 7.5 years old, no labels, zero comments, no maintainer activity; affected 2.x version is long deprecated.

Suggested action: close stale

Reason: The issue is 2751 days old with zero comments and no maintainer interaction, and it is no longer applicable: the traceback references snapcraft/_store.py and cli/assertions.py from the 2.43.1+18.4 (Python 3.6) era, code paths that no longer exist in the current snapcraft/store and snapcraft/commands layout, and the GPG 'Operation cancelled' error is an environmental pinentry/agent problem that cannot be reproduced without the reporter's setup.

Impact: 20 Quick Win: 12.0 Staleness: 95 Complexity: 40 Confidence: 70 Support Request: 45

Issue body

Snapcraft register-key We strongly recommend enabling multi-factor authentication: https://help.ubuntu.com/community/SSO/FAQs/2FA Registering key ... error: cannot sign assertion: cannot sign using GPG: /usr/bin/gpg --personal-digest-preferences SHA512 --default-key 0x377B1F6C67A0CDF54EF646F384E85D1824ACA077 --detach-sign failed: exit status 2 ("gpg: signing failed: Operation cancelled\ngpg: signing failed: Operation cancelled\n") Sorry, an error occurred in Snapcraft: Traceback (most recent call last): File "/usr/bin/snapcraft", line 11, in <module> load_entry_point('snapcraft==2.43.1+18.4', 'console_scripts', 'snapcraft')() File "/usr/lib/python3/dist-packages/click/core.py", line 722, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3/dist-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3/dist-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/usr/lib/python3/dist-packages/snapcraft/cli/assertions.py", line 75, in register_key snapcraft.register_key(key_name) File "/usr/lib/python3/dist-packages/snapcraft/_store.py", line 409, in register_key account_key_request = _export_key(key["name"], account_info["account_id"]) File "/usr/lib/python3/dist-packages/snapcraft/_store.py", line 323, in _export_key universal_newlines=True, File "/usr/lib/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout File "/usr/lib/python3.6/subprocess.py", line 418, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['snap', 'export-key', '--account=Q37o0tqlu1Y68t0ydy9rPwo81hLaXBgV', 'muthiah']' returned non-zero exit status 1. We would appreciate it if you created a bug report at https://launchpad.net/snapcraft/+filebug with the above text included.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 20
Quick Win: 12.0
Staleness: 95
Complexity: 40
Confidence: 70
Support Request: 45
close stale snapcraft 2.43.1 register-key fails with GPG 'Operation cancelled' during snap export-key; 7.5 years old, no labels, zero comments, no maintainer activity; affected 2.x version is long deprecated.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 20
Confidence: 90
Support Request: 75
close stale User reports snapcraft register-key failing with a GPG signing error on version 2.43.1. No maintainer response, inactive for over 7 years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 15
Confidence: 90
Support Request: 85
close stale snapcraft register-key fails with GPG signing cancellation on version 2.43.1. Unanswered for over seven years with no maintainer engagement.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 35
Confidence: 88
Support Request: 92
close stale Report of snapcraft register-key failing due to GPG signing cancellation. Over 7 years old with no maintainer response or reproduction steps, likely stemming from local environment configuration rather than a platform bug.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 25
Confidence: 90
Support Request: 70
close stale User reports snapcraft register-key failing with a GPG signing cancellation error and Python traceback. Issue is over 7 years old with no maintainer interaction and references a deprecated snapcraft version.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft (launchpad)#2065075 (confidence 60%)

    Same register-key command failing at the GPG layer (timeout variant); also open with no maintainer interaction.

  • Related To: snapcraft (launchpad)#1634803 (confidence 40%)

    Different register-key failure mode (SSO credential re-prompt), included as context for the command's historical reliability issues.

Related issues

Issue Project State Summary Similarity
#2065075 snapcraft register-key timeout snapcraft (launchpad) open snapcraft register-key fails with GPG timeout error; issue is 849 days old with no maintainer engagement
86%
#1858994 snapcraft list-keys doesn't show the non-registered key when no key is registered snapcraft (launchpad) open list-keys (snapcraft 3.8) fails to show a locally created key when no key is registered yet, printing 'No keys have been registered' instead. Unlabelled, zero comments, no activity for ~6.6 years; the command was later removed and replaced by snapcraft keys.
75%
#1634803 snapcraft register-key doesn't use U1 SSO login credentials snapcraft (launchpad) open register-key re-prompts for U1 SSO credentials even after a successful snapcraft login, tested on snapcraft 2.19. ~10 years old, unlabelled, 0 comments, no maintainer activity; a near-identical Launchpad bug is also open.
74%
#1669471 problems on revoking a gpg key for signing assertions snapcraft (launchpad) open snapcraft revoke-key prints usage help instead of revoking a GPG key (snapcraft 2.27.1). No comments or maintainer response for ~9.5 years. Version is long deprecated and store commands were reorganized under the snapcraft store subcommand.
74%
#1637623 snapcraft create-key displays an ugly error when the keys don't match snapcraft (launchpad) open snapcraft create-key leaks a raw subprocess error when passphrases don't match. Labeled store/ui, filed by a maintainer, no comments for ~10 years; a related error-message bug was closed as abandoned.
72%
#1996618 Snapcraft does not list keys reported from snapd via External Key Manager snapcraft (launchpad) open snapcraft list-keys fails to show keys from External Key Manager when no keys are registered. Unlabelled, 0 comments, inactive for ~3.2 years.
71%