Skip to content

Commit 62138d6

Browse files
committed
Simplify GPG import - use --passphrase-fd for passphrase input
Use --passphrase-fd 0 to read passphrase from stdin during import. This is more reliable than --passphrase flag with --import.
1 parent 8e11453 commit 62138d6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,9 @@ jobs:
232232
# Start gpg-agent with loopback pinentry
233233
gpg-agent --daemon --allow-loopback-pinentry
234234
235-
# Import the subkey (passphrase will be provided via pinentry loopback)
236-
echo "$GPG_PRIVATE_KEY" | gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" --import
235+
# Import the subkey using passphrase via stdin
236+
# Note: --passphrase-fd 0 reads passphrase from stdin
237+
echo "$GPG_PASSPHRASE" | gpg --batch --yes --pinentry-mode loopback --passphrase-fd 0 --import <<< "$GPG_PRIVATE_KEY"
237238
238239
# Trust the key (required for signing)
239240
# Use ultimate trust (6) for the subkey

0 commit comments

Comments
 (0)