aptly icon indicating copy to clipboard operation
aptly copied to clipboard

Expose the --gpg-key option to aptly publish

Open Fuuzetsu opened this issue 3 years ago • 0 comments

:person_frowning: Problem Statement

Currently when using this recipe, the first thing it does is generate a GPG key to use when publishing snapshots. We're not allowed to pass in our own key and subsequent aptly publish actions only assume the presence of the one, generated key.

Nevertheless, it's possible to use ones own key by replacing .gnupg directory with one containing pre-generated key.

This is however quite annoying to do: it'd be much easier if we could instead import existing keys into the .gnupg via standard means and then have the recipe use the correct one.

Replacing the whole .gnupg is especially annoying if we decide that we want to change the GPG mid-way through: just importing a new key would be much easier.

:grey_question: Possible Solution

I think this can potentially be addressed by the --gpg-key flag of aptly publish. If there publish resource had an option to specify key by ID, the user can import their own keys and use those instead.

:arrow_heading_up: Describe alternatives you've considered

Replacing .gnupg completely after the cookbook creates it.

Fuuzetsu avatar Apr 16 '21 00:04 Fuuzetsu