From cb88b74f1d307e07d030cbbd504a3edb20004a21 Mon Sep 17 00:00:00 2001 From: Andrew Coleman Date: Fri, 19 Aug 2022 14:58:57 -0400 Subject: [PATCH] only use ssh-agent in wsl --- .chezmoiignore | 2 +- dot_config/bash/ssh-agent.sh.tmpl | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.chezmoiignore b/.chezmoiignore index 5be9bba..d226871 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -7,7 +7,7 @@ .ssh/github .ssh/github.pub {{- end }} -{{- if ne .chezmoi.os "linux" }} +{{- if not (contains "microsoft" .chezmoi.kernel.osrelease) }} .config/bash/ssh-agent.sh .config/bash/xhost.sh .config/systemd/ diff --git a/dot_config/bash/ssh-agent.sh.tmpl b/dot_config/bash/ssh-agent.sh.tmpl index ddf4cd0..6a95197 100644 --- a/dot_config/bash/ssh-agent.sh.tmpl +++ b/dot_config/bash/ssh-agent.sh.tmpl @@ -1,4 +1,3 @@ -{{- if (contains "microsoft" .chezmoi.kernel.osrelease) -}} if [ -z "$(pgrep ssh-agent)" ]; then rm -rf /tmp/ssh-* eval $(ssh-agent -s) > /dev/null @@ -6,7 +5,3 @@ else export SSH_AGENT_PID=$(pgrep ssh-agent) export SSH_AUTH_SOCK=$(find /tmp/ssh-* -name agent.*) fi -{{- else -}} -SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" -export SSH_AUTH_SOCK -{{ end }}