← Back to issue list

snapcraft create-key doesn't require login, but snapcraft list-keys does

View original Launchpad issue

Metadata

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

Current evaluation

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.

Suggested action: close stale

Reason: The specific command referenced (list-keys) has been removed and replaced by the keys command (commit 30c9fcd19, PR #6144), making the reproduction steps in the issue no longer valid. The issue is 3594 days old with zero comments or maintainer interaction. While the underlying login requirement persists in the keys command, the issue as written no longer applies to the current CLI surface.

Impact: 15 Quick Win: 11.25 Staleness: 92 Complexity: 25 Confidence: 78 Support Request: 5

Issue body

You can call snapcraft create-key without having logged in. The problem is that then you can see the key you have just created without logging in. This is a weird situation. And it might make people suspicious, because why do you need the network to query for a local key. To reproduce: $ snapcraft logout $ snapcraft create-key $ snapcraft list-keys No valid credentials found. Have you run "snapcraft login"? Invalid credentials: Root macaroon not in the config file. I think that the login is requested to check if the local keys have been registered in the server. If that is the case, maybe we can print that it's required to login to check the registered keys in the server.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 15
Quick Win: 11.25
Staleness: 92
Complexity: 25
Confidence: 78
Support Request: 5
close stale 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.
qwen/qwen3.6-35b-a3b
Staleness: 100
Complexity: 15
Confidence: 90
Support Request: 10
close stale CLI inconsistency where creating a key works without login but listing keys fails with credential errors. Issue is over 9 years old with no maintainer interaction.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 15
Confidence: 90
Support Request: 10
close stale Inconsistency where snapcraft create-key works without authentication, but list-keys fails with a login error. Issue is nearly 10 years old with no maintainer response or updates.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 15
Confidence: 90
Support Request: 10
close stale Inconsistency where snapcraft create-key works without authentication, but list-keys fails with credential errors. Unaddressed for nearly 10 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 100
Complexity: 15
Confidence: 95
Support Request: 10
close stale snapcraft create-key works offline but list-keys fails with credential errors. Suggests enforcing login or improving error messaging. Open, unassigned, zero comments, awaiting triage.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#6141 (confidence 70%)

    Refactored create-key command to explicitly handle 401/no-login case, partially addressing the inconsistency by making create-key intentionally work without login.

  • Related To: snapcraft#6144 (confidence 70%)

    Migrated the keys command; list-keys became a removed alias pointing to keys, changing the command surface referenced in this issue.

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.
76%
#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.
76%
#1637623 snapcraft create-key displays an ugly error when the keys don't match snapcraft (launchpad) open snapcraft create-key leaks a raw subprocess error when passphrases don't match. Labeled store/ui, filed by a maintainer, no comments for ~10 years; a related error-message bug was closed as abandoned.
73%