Skip to content

Commit 149f19d

Browse files
committed
Fix GPG TTY configuration for CI
1 parent 581e620 commit 149f19d

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/build-and-release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,27 @@ jobs:
4444
KEY_FPR=$(gpg --list-keys --with-colons | grep '^fpr' | head -n1 | cut -d: -f10)
4545
echo "${KEY_FPR}:6:" | gpg --import-ownertrust
4646
47-
# Configure GPG for non-interactive use in CI
48-
export GPG_TTY=$(tty) || export GPG_TTY=/dev/null
47+
# Configure GPG for non-interactive use in CI (no TTY)
4948
mkdir -p ~/.gnupg
5049
chmod 700 ~/.gnupg
5150
52-
# Configure GPG to use loopback pinentry (no GUI)
51+
# Configure GPG to use loopback pinentry (no GUI, no TTY)
5352
cat > ~/.gnupg/gpg.conf << 'EOF'
5453
use-agent
5554
pinentry-mode loopback
55+
batch
56+
no-tty
5657
EOF
5758
5859
cat > ~/.gnupg/gpg-agent.conf << 'EOF'
5960
allow-loopback-pinentry
6061
max-cache-ttl 3600
62+
default-cache-ttl 3600
6163
EOF
6264
6365
# Restart GPG agent to apply new configuration
6466
gpgconf --kill gpg-agent || true
65-
gpg-agent --daemon || true
67+
gpg-agent --daemon --allow-loopback-pinentry || true
6668
6769
echo "✓ GPG configured for CI environment"
6870

0 commit comments

Comments
 (0)