Snapcraft does not list keys reported from snapd via External Key Manager
Metadata
Current evaluation
snapcraft list-keys fails to show keys from External Key Manager when no keys are registered. Unlabelled, 0 comments, inactive for ~3.2 years.
Suggested action: close stale
Reason: The issue is 1388 days old with no maintainer response. The referenced code is in `snapcraft_legacy/_store.py`, and a related issue (#1858994) indicates the `list-keys` command was removed and replaced by `snapcraft keys`, making this issue no longer applicable.
Impact:
25
Quick Win:
18.75
Staleness:
85
Complexity:
25
Confidence:
55
Support Request:
15
Issue body
Hi Snapcraft Team,
snapcraft does not report the keys that are coming from the snapd if the account has no keys created and registered before.
When using my own account, I'm able to see the keys that are created and registered;
```
bugraaydogar@aydogar-ws:~$ snapcraft list-keys
Name SHA3-384 fingerprint
* uc-signing-key aaa
* serial bbb
* model ccc
- bugra-serial ddd (not registered)
- bugra-model eee (not registered)
```
The snapd also returns the mentioned keys above;
```
bugraaydogar@aydogar-ws:~$ snap keys
Name SHA3-384
uc-signing-key aaa
serial bbb
model ccc
bugra-serial ddd
bugra-model eee
```
After definition of the SNAPD_EXT_KEYMGR, I can fetch the following keys from the external key manager via snapd;
```
bugraaydogar@aydogar-ws:~$ snap keys
Name SHA3-384
ubuntu-core-model zzz
ubuntu-core-model-prod2 yyy
ubuntu-core-model-prod xxx
```
I can also see the output of the snapcraft list-keys.
```
bugraaydogar@aydogar-ws:~/$ snapcraft list-keys
Name SHA3-384 fingerprint
- ubuntu-core-model zzz (not registered)
- ubuntu-core-model-prod2 yyy (not registered)
- ubuntu-core-model-prod xxx (not registered)
```
However if there is an account with no keys registered previously, it does not report anything;
```
$ snapcraft list-keys
No keys have been registered. See 'snapcraft register-key --help' to register a key.
```
I think this is due to the following code;
https://github.com/snapcore/snapcraft/blob/main/snapcraft_legacy/_store.py#L442
I think, we should also cover the case where there is no keys registered to the store but snapd provides the keys.
Thanks,
Bugra
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 |
Impact:
25
Quick Win:
18.75
Staleness:
85
Complexity:
25
Confidence:
55
Support Request:
15
|
close stale | snapcraft list-keys fails to show keys from External Key Manager when no keys are registered. Unlabelled, 0 comments, inactive for ~3.2 years. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
95
Complexity:
30
Confidence:
75
Support Request:
5
|
close stale | snapcraft list-keys fails to display keys from snapd's External Key Manager when no keys are pre-registered. Points to legacy store code. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
95
Complexity:
35
Confidence:
85
Support Request:
15
|
close stale | snapcraft list-keys fails to report keys from snapd's External Key Manager when no keys are pre-registered. Points to legacy code. Inactive for over 3 years with no maintainer response. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
95
Complexity:
20
Confidence:
90
Support Request:
5
|
close stale | snapcraft list-keys fails to display keys from snapd's External Key Manager when no keys are pre-registered. Untriaged, inactive for over three years, and references deprecated snapcraft_legacy code. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
92
Complexity:
25
Confidence:
85
Support Request:
10
|
close stale | Reports snapcraft list-keys failing to show keys from snapd's External Key Manager when no prior keys are registered. Inactive for over 3 years with no maintainer response. |
Update history
No update history recorded yet.
Related work
-
Duplicate Of:
launchpad#1858994
(confidence 70%)
Related Launchpad issue with similar title; its summary indicates the command was removed and replaced by snapcraft keys.
-
Duplicate Of:
launchpad#1720207
(confidence 60%)
Another related issue about list-keys returning no keys when user has keys.
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. | |
| #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. | |
| #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. | |
| #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. | |
| #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. | |
| #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. |