Validation sets

I read through the snapd source code to figure this out. The command snap create-key doesn’t show up in snap help --all and I couldn’t find documentation for it.

snap create-key will create a gpg key named “default” in $SNAP_GNUPG_HOME which is $HOME/.snap/gnupg. This is what the doc means by the “default key”. You can also create a key with snapcraft-create key <key-name>, but it doesn’t use “default” by default.

snap create-key <key-name> will create a key with a different name. You can then use this key name with snapcraft edit-validation-sets --key-name <key-name>.

And before you can successfully edit a validation set with Snapcraft, you first must call snapcraft register <key-name> to register the key with the store.

1 Like

Brilliant!

That could be clarified in this doc; I would also say that we should note that folx not register the key they create here just in case they want to add as a role to that key such that it can only sign validation sets, and in such a case they should create a support ticket asking for such.