← 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

Observed behavior is resolved: keys now displays registered remote-only key fingerprints separately from local keys; legacy list-keys was renamed and removed in Snapcraft 9.

Suggested action: close resolved

Reason: Commit 1c44a58fc (canonical/snapcraft#4245) addressed the missing list-keys case, and the current keys implementation and unit tests explicitly display registered fingerprints that are unavailable locally. The command was renamed in Snapcraft 8.13, and the legacy list-keys alias was removed in Snapcraft 9.0.

Evaluated by: mr-cal-bot

Impact: 42 Quick Win: 29 Complexity: 28 Confidence: 98 Actionability: 96

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
stealth/space-bunny-alpha
Impact: 42
Quick Win: 29
Complexity: 28
Confidence: 98
Actionability: 96
close resolved Observed behavior is resolved: keys now displays registered remote-only key fingerprints separately from local keys; legacy list-keys was renamed and removed in Snapcraft 9.
stealth/space-bunny-alpha
Impact: 35
Quick Win: 26
Complexity: 22
Confidence: 96
Actionability: 95
close resolved list-keys appeared empty when an account had a registered key without its local keypair. Current keys output now reports registered fingerprints unavailable on the system.
qwen/qwen3.6-35b-a3b
Impact: 45
Quick Win: 22
Complexity: 40
Confidence: 85
Actionability: 80
keep open snapcraft list-keys returns an empty table for users who actually have keys, as confirmed by create-key reporting a duplicate default key.
qwen/qwen3.8-27b
Impact: 20
Quick Win: 10
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.

Update history

Date Change
created

Related work

  • Related To: snapstore#1800825 (confidence 98%)

    The maintainer explicitly identified this issue as related.

  • Likely Fixed By: canonical/snapcraft#4245 (confidence 94%)

    Commit 1c44a58fc added the missing list-keys handling.

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 hid local unregistered keys when no key was registered (snapcraft 3.8). Fixed by 1c44a58fc; today's 'keys' command lists local keys and marks unregistered ones, and list-keys was removed in Snapcraft 9.
88%
#1996618 Snapcraft does not list keys reported from snapd via External Key Manager snapcraft (launchpad) open Legacy `snapcraft list-keys` hid keys returned by snapd/External Key Manager when the account had no registered keys; superseded by the craft-app `keys` command and Snapcraft 9 removal of list-keys.
81%
#1720210 snapcraft list-keys with no keys returns an empty table snapcraft (launchpad) closed Empty-key output was fixed by PR #4245 (commit 1c44a58fc): keys now reports that no keys are registered and points users to register-key help.
79%
#1622037 snapcraft list-keys prints no message when there are no keys snapcraft (launchpad) closed Fixed in #1784 (commit 5c76509ff); snapcraft list-keys now prints a helpful message when no keys are present instead of an empty table.
79%
#1736864 snapcraft list-keys with no snap keys returns an empty table snapcraft (launchpad) closed Fixed via merged canonical/snapcraft#1784 (commit 5c76509ff): list-keys now shows registration guidance instead of an empty table when no keys exist.
77%
#1784 cli: show helpful message for 'snapcraft list-keys' with no keys snapcraft merged Merged PR #1784 (commit 5c76509ff): snapcraft list-keys now directs users to register-key --help when no keys exist instead of printing an empty table.
74%
#1621895 Implement `snapcraft list-keys` snapcraft (launchpad) closed snapcraft list-keys was implemented by merged PR snapcore/snapcraft#786 in commit 233adda3a, showing store-account keys alongside local key data.
71%
#1637625 snapcraft create-key doesn't require login, but snapcraft list-keys does snapcraft (launchpad) open The authentication inconsistency remains in the renamed keys command: create-key works while logged out, but keys requires Store credentials before showing local keys.
70%
#786 Add `snapcraft list-keys` snapcraft merged Merged #786 as 233adda3a, adding snapcraft list-keys to display keys registered to the user's Store account alongside local key data.
70%