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

aptly gets confused when secret key is available in gnupg2, but not in gnupg1. #858

Closed
vi opened this issue Jul 14, 2019 · 3 comments
Closed

Comments

@vi
Copy link

vi commented Jul 14, 2019

aptly publish ... started failing.

Context

strace shows that aptly publish calls gpg --version (for me gpg (GnuPG) 2.2.12 libgcrypt 1.8.4), then gpg1 --version (for me gpg (GnuPG) 1.4.23), then settles on continuing with gpg1.

Finally it comes to gpg1 -o /tmp/aptly024000720/Release.gpg --digest-algo SHA256 --armor --yes -u 0xD4...3A --detach-sign /tmp/aptly024000720/Release, which fails with gpg: signing failed: secret key not available. If I manually execute the command line, but with gpg1 changed to gpg2, then it works.

Possible Implementation

Use gpg2 / gpg when gpg1 fails with secret key not available, or at least use it by default instead of explicitly calling gpg1.

Your Environment

After updating from Debian Stretch to Debian Buster (amd64) aptly publish stopped working.

Workaround

  • Uninstalling or temporarily disabling gnupg1 and gpgv1.
  • Exporting the secret key from gpg2 and importing to gpg1 (not checked).
@smira
Copy link
Contributor

smira commented Jul 19, 2019

Looks like documentation is outdated (https://www.aptly.info/doc/feature/pgp-providers/), but the story is that aptly for a long time supported only GnuPG 1, and preferred that by default. When support for different gpg providers landed, aptly still prefers gpg1 to stay compatible with older versions. If you want to use gpg2, just add gpgProvider: gpg2` to your aptly config, and aptly will stick with gpg2.

I created aptly-dev/www.aptly.info#78 to track docs update

@smira smira closed this as completed Jul 19, 2019
@vi
Copy link
Author

vi commented Jul 19, 2019

I tried gpgProvider: gpg2 and it said that gpg2 is not in the list of known providers (or something like that). It was on previous version although.

@smira
Copy link
Contributor

smira commented Jul 19, 2019

It's part of the latest release, 1.4.0 https://github.com/aptly-dev/aptly/releases/tag/v1.4.0

You can get it from www.aptly.info/download/

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

No branches or pull requests

2 participants