Skip to content

Commit 0932355

Browse files
vinokurigclaude
andcommitted
fix: handle non-passphrase SSH prompts in askpass script
Add early exit for SSH prompts that aren't requesting passphrase input. This prevents the askpass script from attempting to provide a passphrase for other SSH prompts like host key verification. Assisted-by: Claude Sonnet 4.5 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Ihor Vinokur <ivinokur@redhat.com>
1 parent 4ea3124 commit 0932355

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

pkg/provision/workspace/ssh-askpass.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#!/bin/sh
2+
# Only handle passphrase prompts - exit silently for other prompts (e.g., HTTPS git repo username/password request)
3+
case "$1" in
4+
\"Enter passphrase for key \'*) ;;
5+
*) exit 0 ;;
6+
esac
27
PASSPHRASE_FILE_PATH="/etc/ssh/passphrase"
38
if [ ! -f $PASSPHRASE_FILE_PATH ]; then
49
echo "Error: passphrase file is missing in the '/etc/ssh/' directory" 1>&2

0 commit comments

Comments
 (0)