Skip to content

fix: fail when no secret GPG key is imported#314

Merged
andrii-bodnar merged 1 commit into
crowdin:masterfrom
oiahoon:fix/missing-secret-gpg-key
Jul 15, 2026
Merged

fix: fail when no secret GPG key is imported#314
andrii-bodnar merged 1 commit into
crowdin:masterfrom
oiahoon:fix/missing-secret-gpg-key

Conversation

@oiahoon

@oiahoon oiahoon commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • stop commit-signing setup immediately when an import produces no secret key
  • remove the temporary key file before returning the new error

Why

GnuPG can successfully import public-only armored key data while --list-secret-keys returns no sec record. The existing setup then continues with an empty signing key ID and fails later without an actionable explanation.

This is the independent fail-fast follow-up discussed in #313.

Verification

  • reproduced the public-only import with GnuPG 2.5.21; the updated function exits with the explicit error and removes private.key
  • verified the valid path with a freshly generated ed25519 private key, a signed Git commit, and git verify-commit
  • sh -n entrypoint.sh
  • ShellCheck diagnostics match master with no new finding
  • git diff --check

@andrii-bodnar andrii-bodnar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oiahoon thank you!

@andrii-bodnar
andrii-bodnar merged commit a8cb5e3 into crowdin:master Jul 15, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants