Remove defensive GPG signing fallbacks - fail fast on errors#56
Remove defensive GPG signing fallbacks - fail fast on errors#56
Conversation
Co-authored-by: mcascone <8335079+mcascone@users.noreply.github.com>
Co-authored-by: mcascone <8335079+mcascone@users.noreply.github.com>
Co-authored-by: mcascone <8335079+mcascone@users.noreply.github.com>
Co-authored-by: mcascone <8335079+mcascone@users.noreply.github.com>
Co-authored-by: mcascone <8335079+mcascone@users.noreply.github.com>
|
@copilot this run failed on the gpg signing https://github.com/MC-Music-Workshop/boomerang-plugin/actions/runs/21934181255/job/63347303688?pr=56 |
Co-authored-by: mcascone <8335079+mcascone@users.noreply.github.com>
Fixed in 307302c. The GPG import was failing due to |
Co-authored-by: mcascone <8335079+mcascone@users.noreply.github.com>
Fixed in 45bd766. Same root cause - the grep command was failing when no secret keys existed. The workflow will now properly degrade to an unsigned build with a warning instead of failing the entire CI run. |
@copilot it doesn't appear to be failing, the secret keys are getting processed and imported: try again. |
…ting errors Co-authored-by: mcascone <8335079+mcascone@users.noreply.github.com>
Fixed in 96eb831. Changed from To verify your GPG_PRIVATE_KEY secret has the correct content (it should be a secret key, not a public key):
# Export your SECRET key (this is what should be in the secret)
gpg --export-secret-keys --armor <KEY_ID>This should output a block starting with
- name: Debug GPG Key Type
run: |
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --list-packets 2>/dev/null | head -20Look for lines like
It should say "secret key" not "public key" if the correct key is imported. The current secret appears to contain only the public key. Re-export with Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
- Add GPG_SIGNING_SUCCESS.md documenting successful implementation - Update README.md with actual key ID: 241C529DF2E79E51 - Update AGENTS.md to mark Linux GPG signing as COMPLETE - Update docs/GPG_SIGNING.md with key ID and fingerprint - Update docs/RELEASE_NOTES_TEMPLATE.md with actual key information - Include example of successful verification output with trust warning - Note that trust warning is normal and expected Co-authored-by: mcascone <8335079+mcascone@users.noreply.github.com>
Now that the root cause is fixed (secret key properly configured), remove defensive code that was hiding failures: - Remove || true from GPG import (line 291) - Remove 2>/dev/null stderr suppression from import and key listing - Fail build if GPG import fails (not just warn) - Fail build if no secret key found (not graceful fallback) - Fail build if signature verification fails (not just warn) - Simplify reporting logic (no SIGNED variable needed) Keep: Empty GPG_PRIVATE_KEY check for legitimate unsigned builds (PRs) If GPG signing is configured, it must succeed or build fails. No silent fallbacks that hide real errors. Co-authored-by: mcascone <8335079+mcascone@users.noreply.github.com>
Defensive code added during debugging was silently falling back to unsigned builds when GPG signing failed. With the root cause fixed (secret key now properly configured), real failures should fail the build.
Changes
Import step:
|| trueand2>/dev/nullfrom import command and key listing::warning::to::error::with actionable guidanceVerification step:
SIGNEDvariable - no longer neededPreserved:
GPG_PRIVATE_KEYcheck still allows unsigned builds (PR/dev workflows)Before/After
Rule: If
GPG_PRIVATE_KEYis configured, signing must succeed or build fails.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.