Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support dearmor GPG key for keyring #1163

Closed
daisukixci opened this issue Jan 9, 2024 · 3 comments
Closed

Support dearmor GPG key for keyring #1163

daisukixci opened this issue Jan 9, 2024 · 3 comments

Comments

@daisukixci
Copy link

Use Case

Some provider we use like Google, Hashicorp only provide ASCII armored gpg key (if I did not miss anything), which seems to not work with the apt keyring mechanism implemented to fix #1034 as from my understanding apt expect binary gpg keys.

Describe the Solution You Would Like

Having a boolean parameter in apt::keyring to specify if the key is armored and dearmor it if necessary

Describe Alternatives You've Considered

Manually dearmore GPG keys and self host them either in puppet code or third party solution

Additional Context

n/a

@kenyon
Copy link

kenyon commented Jan 10, 2024

ASCII armored keys are supported. You have to name them with a .asc extension if ASCII armored, and .gpg if binary. This is an APT thing, not an issue with this module. This is documented:

You can fetch GPG keys via HTTP, Puppet URI, or local filesystem. The key can be in GPG binary format, or ASCII armored, but the filename should have the appropriate extension (`.gpg` for keys in binary format; or `.asc` for ASCII armored keys).

@kenyon
Copy link

kenyon commented Jan 10, 2024

Also note that there is a bug in APT that causes it to fail if ASCII armored keys use Windows/DOS text format. You'll want to dos2unix the file first, if you find such a key. Reference: https://salsa.debian.org/apt-team/apt/-/merge_requests/309

@daisukixci
Copy link
Author

Gotcha sorry for the trouble and thanks for the quick answer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants