From 270da9ca428159d1a56e46783bd12a82d7ce3d50 Mon Sep 17 00:00:00 2001 From: Dict Xiong Date: Sat, 22 Feb 2025 19:09:22 +0800 Subject: [PATCH] fix(sagent): error note --- tools/sagent-op.sh | 4 ++-- tools/sagent.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/sagent-op.sh b/tools/sagent-op.sh index a167e08..8fd8c5c 100755 --- a/tools/sagent-op.sh +++ b/tools/sagent-op.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash set -e -op=$(command -v op || command -v op.exe) +op=$(command -v op || command -v op.exe || true) if [[ ! -x $op ]]; then - echo "1password cli not found" + echo "1password cli not found" > /dev/stderr exit -1 fi "$op" read "op://Personal/id25519-passphrase/$(hostname)" diff --git a/tools/sagent.sh b/tools/sagent.sh index 570ce35..409a9ac 100755 --- a/tools/sagent.sh +++ b/tools/sagent.sh @@ -49,7 +49,7 @@ add_piv() add_id25519_with_op() { - SSH_ASKPASS_REQUIRE=force SSH_ASKPASS="$THIS_DIR/sagent-op.sh" timeout 30s ssh-add ~/.ssh/id_ed25519 || fmt_fatal "timed out when adding the key. probably the passphrase is wrong" + SSH_ASKPASS_REQUIRE=force SSH_ASKPASS="$THIS_DIR/sagent-op.sh" timeout 60s ssh-add ~/.ssh/id_ed25519 || fmt_fatal "timed out when adding the key. probably the passphrase is wrong or 1password-cli is not working" list }