snapcraft list-keys returns no keys, but the user has keys
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snap Store Server |
Confirmed
|
Medium
|
Unassigned | ||
Snapcraft |
New
|
Undecided
|
Unassigned |
Bug Description
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_
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.
list-keys only lists *local* keys, it does not show the remote keys uploaded to the store (i.e. the one you registered).
You need to have a corresponding local key (private/public keypair) in order do to signing operations, while the store only has the public portion. So even if you could see that "default" is registered in the store, if you don't have the matching private/public pair, you won't be able to do anything with it.
If you don't have the keypair for "default", at this point your only option is to create a new keypair and register it with the store under another name.
This is also related to https:/ /bugs.launchpad .net/snapstore/ +bug/1800825.
I'll mark this as won't fix since this behavior, while weird, is by design.