← Back to issue list

snapcraft list-keys with no keys returns an empty table

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1720210
Type
issue
State
closed
Author
~elopio
Labels
bitesize store
Created
Updated
Closed

Current evaluation

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.

Resolution: closed resolved

Reason: Commit 1c44a58fc in PR #4245 added the missing no-registered-keys branch and a regression test. The command now prints a clear message directing users to snapcraft register-key --help.

Evaluated by: mr-cal-bot

No scores available.

Issue body

I'm running snapcraft keys with a user that has no keys: $ snapcraft keys Name SHA3-384 fingerprint Instead of reporting an empty table, it should return a nice message saying that no keys are registered. Maybe explaining how to register one.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved 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.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR canonical/snapcraft#1784 (commit 5c76509ff): list-keys now recommends register-key --help instead of displaying an empty table.
stealth/space-bunny-alpha — closed resolved Fixed in PR #1784 (commit 5c76509ff): snapcraft list-keys now directs users to register-key --help when no keys are registered instead of showing an empty table.
qwen/qwen3.6-35b-a3b — — Abandoned. Closed without implementation, leaving snapcraft list-keys to display an empty table instead of a helpful message when no keys are registered.
qwen/qwen3.6-35b-a3b — — The request to replace the empty table with a helpful message for snapcraft list-keys when no keys exist was closed without implementation, likely abandoned.
qwen/qwen3.6-35b-a3b — — Closed without implementation. The requested user-friendly message for unregistered keys was never added, leaving the empty table behavior unchanged. The issue appears abandoned due to zero comments and inactivity.
qwen3.6-35b-a3b-mtp-q6 — — The request to show a helpful message instead of an empty table for snapcraft keys was closed without implementation. No PRs were opened, indicating the feature was abandoned due to inactivity.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcraft#4245 (confidence 98%)

    Commit 1c44a58fc adds the no-keys message and corresponding test coverage.

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

    A maintainer explicitly linked the behavior to this separately reported Launchpad issue.

Related issues

Issue Project State Summary Similarity
#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.
87%
#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.
85%
#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.
79%
#1720207 snapcraft list-keys returns no keys, but the user has keys snapcraft (launchpad) open 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.
79%
#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.
79%
#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.
70%