← Back to issue list

snapcraft list-keys doesn't show the non-registered key when no key is registered

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1858994
Type
issue
State
open
Author
~ethan.hsieh
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action: close stale

Reason: The issue is 2427 days old with zero comments, no labels, and no maintainer interaction, and it targets snapcraft 3.8. Related Launchpad bug #1720207's summary notes the list-keys command has since been removed and replaced by 'snapcraft keys', so the reported behavior is no longer reproducible in the current version — inactivity plus obsolescence, not age alone.

Impact: 15 Quick Win: 12.0 Staleness: 95 Complexity: 20 Confidence: 70 Support Request: 10

Issue body

Here are the reproduction steps: $ snapcraft create-key test We're supposed to get following result $ snapcraft list-keys     Name SHA3-384 fingerprint - test <fingerprint> (not registered) But, list-keys returns no keys $ snapcraft list-keys No keys have been registered. See 'snapcraft register-key --help' to register a key. Need to register the first key. $ snapcraft register-key test $ snapcraft list-keys     Name SHA3-384 fingerprint * test <fingerprint> After the first key is registered, list-keys can show the non-registered key. $ snapcraft create-key serial $ snapcraft list-keys     Name SHA3-384 fingerprint * test <fingerprint> - serial <fingerprint> (not registered) --- $ snap list Name Version Rev Tracking Publisher Notes snapcraft 3.8 3440 stable canonical* classic

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 15
Quick Win: 12.0
Staleness: 95
Complexity: 20
Confidence: 70
Support Request: 10
close stale 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.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 25
Confidence: 90
Support Request: 5
close stale snapcraft list-keys fails to display unregistered keys until a key is registered. Reported for v3.8 with no maintainer response in over 6 years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 20
Confidence: 80
Support Request: 5
close stale Bug where snapcraft list-keys fails to display newly created keys until at least one key is registered. Issue is over six years old with no maintainer interaction.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 20
Confidence: 75
Support Request: 5
close stale Bug where snapcraft list-keys fails to display locally created but unregistered keys until a key is registered. Untriaged, inactive for over 6 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 15
Confidence: 85
Support Request: 5
close stale Bug where snapcraft list-keys fails to display locally created keys until one is registered. Reported over six years ago with zero maintainer response or activity.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft (launchpad)#1720207 (confidence 70%)

    Same command, same symptom class (list-keys hides keys); its summary states list-keys was removed and replaced by 'keys', supporting that this issue is obsolete.

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

    Also reports list-keys failing to display keys when no keys are pre-registered (External Key Manager variant), pointing to the same legacy store code.

  • Related To: snapcraft (launchpad)#1736864 (confidence 55%)

    Sibling list-keys display bug (empty table instead of message), fixed in PR #1784; different symptom but same legacy command.

Related issues

Issue Project State Summary Similarity
#1720207 snapcraft list-keys returns no keys, but the user has keys snapcraft (launchpad) open Maintainer elopio reported snapcraft list-keys showing an empty table despite the user having a registered key, while create-key says a 'default' key exists. Zero comments, no activity for ~6.4 years; the list-keys command has since been removed and replaced by keys.
87%
#1622037 snapcraft list-keys prints no message when there are no keys snapcraft (launchpad) open snapcraft list-keys prints only an empty table header when no keys are registered; a friendly message (and possibly tips on adding keys) is requested. Unlabelled, zero comments, no activity for ~10 years; a similar Launchpad bug remains open.
86%
#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.
84%
#1720210 snapcraft list-keys with no keys returns an empty table snapcraft (launchpad) closed Abandoned. Closed without implementation, leaving snapcraft list-keys to display an empty table instead of a helpful message when no keys are registered.
83%
#1637625 snapcraft create-key doesn't require login, but snapcraft list-keys does snapcraft (launchpad) open CLI inconsistency: create-key works without login but list-keys fails with credential errors. Issue is 9.8 years old with zero comments. The list-keys command has since been removed and replaced by the keys command, which still requires login.
76%
#1816524 snapcraft register-key fails snapcraft (launchpad) open 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.
75%
#1736864 snapcraft list-keys with no snap keys returns an empty table snapcraft (launchpad) closed Fixed via PR #1784. The command now displays a helpful message instead of an empty table when no local keys are registered, resolving the reported UX issue.
75%
#1784 cli: show helpful message for 'snapcraft list-keys' with no keys snapcraft merged Merged fix replacing the empty table output of snapcraft list-keys with a helpful message directing users to register-key --help. Added a unit test mocking an empty key list. Approved and merged after reviewer guidance on test implementation.
73%