Skip to content

Commit 623b0b3

Browse files
committed
Fix GPG import command syntax - use process substitution for passphrase
Use fd 3 for passphrase and stdin for key data to avoid conflicts.
1 parent 62138d6 commit 623b0b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,9 @@ jobs:
232232
# Start gpg-agent with loopback pinentry
233233
gpg-agent --daemon --allow-loopback-pinentry
234234
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"
235+
# Import the subkey using passphrase via file descriptor
236+
# Use process substitution to provide passphrase on fd 3, key on stdin
237+
gpg --batch --yes --pinentry-mode loopback --passphrase-fd 3 --import 3<<< "$GPG_PASSPHRASE" <<< "$GPG_PRIVATE_KEY"
238238
239239
# Trust the key (required for signing)
240240
# Use ultimate trust (6) for the subkey

0 commit comments

Comments
 (0)