← Back to issue list

snapcraft list-keys returns no keys, but the user has keys

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1720207
Type
issue
State
open
Author
~elopio
Labels
store
Created
Updated
Closed

Current evaluation

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.

Suggested action: close stale

Reason: The reported command no longer exists: per snapcraft (launchpad)#1637625, list-keys was removed and replaced by the keys command, and the reporter's own repro shows `snapcraft keys` correctly lists the default key. With zero comments and no activity for ~6.4 years, the original problem is no longer reproducible, so the issue is obsolete rather than merely inactive.

Impact: 20 Quick Win: 10.0 Staleness: 90 Complexity: 50 Confidence: 70 Support Request: 20

Issue body

I am here with ogra checking the snapcraft list-keys command: $ snapcraft list-keys Name SHA3-384 fingerprint It returns nothing for our real users. Mine is <email address hidden>. When we try to create a key: $ snapcraft create-key You have already registered a key named 'default' It says that we already have a default key. But list-keys is not showing it. I tried this with a new test user. I ran list-keys and it showed nothing. Then I ran snapcraft create-key and created the default key. Then I ran list-keys, and the key is shown: $ snapcraft keys Name SHA3-384 fingerprint - default EjOBIMR_SUxu6z141hsAB22FBTzzkOf606psj0PXMyu2eMZrc3Vb-TaP7r6CAmUV (not registered) So there's something weird going on with my user and with ogra's. I'm reporting this bug, because it sounds like a bug to me. But maybe somebody with more experience in keys can tell us if we are doing something wrong.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 20
Quick Win: 10.0
Staleness: 90
Complexity: 50
Confidence: 70
Support Request: 20
close stale 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.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 25
Confidence: 90
Support Request: 15
close stale Bug report where snapcraft list-keys fails to display existing keys for specific users. No maintainer response or activity in over six years. Likely obsolete in current versions.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 30
Confidence: 90
Support Request: 20
close stale snapcraft list-keys returns empty despite existing keys, while create-key reports a key already exists. The issue has been inactive for over 6 years with no maintainer response or updates.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 45
Confidence: 85
Support Request: 20
close stale snapcraft list-keys returns empty despite existing keys, while create-key confirms a key exists. Issue is over 8 years old with no maintainer response or activity for 6+ years.
qwen3.6-35b-moe-q4
Staleness: 95
Complexity: 45
Confidence: 90
Support Request: 20
close stale snapcraft list-keys returns empty for users with existing keys, while create-key claims a key already exists. Untriaged and inactive for over 6 years.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft (launchpad)#1637625 (confidence 75%)

    Its summary states the list-keys command has since been removed and replaced by the keys command, which is why this issue is no longer actionable.

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

    Adjacent list-keys display bug (unregistered keys not shown when none registered), same command family but a different symptom.

Related issues

Issue Project State Summary Similarity
#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.
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%
#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.
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.
80%
#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.
79%
#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%
#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.
72%
#5683 Investigate why `list-keys` makes repeated API calls snapcraft open Research task to reduce repeated API calls in snapcraft list-keys. The command was removed and replaced with 'keys' (PR #6144), which uses a single get_account_info() call. The referenced legacy test file no longer exists. No activity in ~13 months.
72%