From b01add300cdbfda6bf95abb862ea81d3086ee0a3 Mon Sep 17 00:00:00 2001 From: Tony Blyler Date: Tue, 8 Nov 2022 20:14:05 -0500 Subject: [PATCH] Update chezmoi and filter FIDO enabled ssh keys from ssh-agent for MacOS --- chezmoi/dot_tool-versions | 2 +- chezmoi/dot_zshrc.d/executable_ssh.zsh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/chezmoi/dot_tool-versions b/chezmoi/dot_tool-versions index 0e36703..565d912 100644 --- a/chezmoi/dot_tool-versions +++ b/chezmoi/dot_tool-versions @@ -1,3 +1,3 @@ golang 1.19.2 -chezmoi 2.24.0 +chezmoi 2.25.0 nodejs lts diff --git a/chezmoi/dot_zshrc.d/executable_ssh.zsh b/chezmoi/dot_zshrc.d/executable_ssh.zsh index 13a43ab..ba0086c 100644 --- a/chezmoi/dot_zshrc.d/executable_ssh.zsh +++ b/chezmoi/dot_zshrc.d/executable_ssh.zsh @@ -31,7 +31,10 @@ function add_ssh_keys() { SSH_AGENT_IDENTITIES="$(ssh-add -l || true)" 2>/dev/null for IDENTITY_FILE in ~/.ssh/id_*~*.pub; do if [[ "$SSH_AGENT_IDENTITIES" != *"$(ssh-keygen -lf "$IDENTITY_FILE")"* ]]; then - NEW_IDENTITIES+=("$IDENTITY_FILE") + # skip _sk keys on MacOS for now + if ! [[ "$OSTYPE" =~ ^darwin ]] || ! [[ "$IDENTITY_FILE" =~ _sk$ ]]; then + NEW_IDENTITIES+=("$IDENTITY_FILE") + fi fi done