Prime gpg-agent so reprepro can sign in CI - #32
Merged
Merged
Conversation
The publish job failed at the export step: gpgme gave error Pinentry:32870: Inappropriate ioctl for device ERROR: Could not finish exporting 'stable'! The rotated signing subkey is passphrase-protected; the previous one was not. reprepro signs through gpgme, which has no mechanism for being handed a passphrase - it can only ask an agent, and with no TTY in CI that request has nowhere to go. Passing --passphrase to gpg does not help, because reprepro never invokes gpg directly. The agent has to already hold the passphrase, so preset it against the signing subkey's keygrip before reprepro runs. Verified locally: with the agent primed, gpg signs with no passphrase argument at all, which is exactly the condition gpgme needs. The preset is skipped when APT_GPG_PASSPHRASE is unset, so an unprotected key still works. Also adds the certify-capability guard already used in archivist's release workflow. This repository's CI holds a signing subkey too, and nothing here checked that. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015AH1v3tR8Xw2DmKqJSipPd
Cam8863
approved these changes
Aug 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The publish run after the key rotation failed:
Nothing was published — the sync steps were skipped, so the bucket is untouched.
Cause
The rotated signing subkey is passphrase-protected; the old one was not.
repreprosigns through gpgme, which has no way to be handed a passphrase —it can only ask an agent. With no TTY in CI, that request has nowhere to go.
Passing
--passphraseto gpg doesn't help, because reprepro never invokes gpgdirectly.
Fix
Preset the passphrase into
gpg-agentagainst the signing subkey's keygripbefore reprepro runs, with
allow-preset-passphraseenabled.Verified locally by reproducing the failure and then the fix:
That last condition — signing with no passphrase argument — is exactly what
gpgme does, so it's the right thing to have tested.
The preset is skipped when
APT_GPG_PASSPHRASEis empty, so an unprotected keystill works and this is safe to merge before the secret exists.
Also
Adds the certify-capability guard from archivist's release workflow. This
repo's CI holds a signing subkey too and nothing here checked it wasn't handed
a full secret key. Field 15 (
#= no private material) is the discriminator,since a stubbed primary and a real one both report
caps=cSC.Before this can publish
Add the passphrase as a secret:
Then re-run
publish-apt.ymlwithtag=release-3.4.9-linux1.