Update chezmoi and filter FIDO enabled ssh keys from ssh-agent for MacOS

This commit is contained in:
Tony Blyler 2022-11-08 20:14:05 -05:00
parent 664c0667de
commit b01add300c
No known key found for this signature in database
2 changed files with 5 additions and 2 deletions

View file

@ -1,3 +1,3 @@
golang 1.19.2
chezmoi 2.24.0
chezmoi 2.25.0
nodejs lts

View file

@ -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