From a615a24f424ff528ea61365e6bd2077a55d05b8e Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Mon, 28 Oct 2024 12:20:55 -0400 Subject: [PATCH] only ssh-add if we have keychain running --- dot_config/zsh/dot_zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dot_config/zsh/dot_zshrc b/dot_config/zsh/dot_zshrc index f0649d7..d6fe9e1 100644 --- a/dot_config/zsh/dot_zshrc +++ b/dot_config/zsh/dot_zshrc @@ -58,7 +58,6 @@ if [[ -n "$WSL_DISTRO_NAME" ]]; then fi # GPG setup (and SSH) -ssh-add ~/.ssh/id_rsa # SSH setup # I finally figured out how to export my id_rsa from GPG using # https://superuser.com/a/1681454 (copied/summarized here to avoid link rot): @@ -81,6 +80,7 @@ ssh-add ~/.ssh/id_rsa if command -v keychain >/dev/null; then alias keychain="keychain --nolock --absolute --dir $XDG_RUNTIME_DIR" eval "$(keychain --quick --eval)" + ssh-add ~/.ssh/id_rsa fi ### End user configuration