only use ssh-agent in wsl
parent
c0c4e962b6
commit
cb88b74f1d
|
@ -7,7 +7,7 @@
|
||||||
.ssh/github
|
.ssh/github
|
||||||
.ssh/github.pub
|
.ssh/github.pub
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if ne .chezmoi.os "linux" }}
|
{{- if not (contains "microsoft" .chezmoi.kernel.osrelease) }}
|
||||||
.config/bash/ssh-agent.sh
|
.config/bash/ssh-agent.sh
|
||||||
.config/bash/xhost.sh
|
.config/bash/xhost.sh
|
||||||
.config/systemd/
|
.config/systemd/
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{{- if (contains "microsoft" .chezmoi.kernel.osrelease) -}}
|
|
||||||
if [ -z "$(pgrep ssh-agent)" ]; then
|
if [ -z "$(pgrep ssh-agent)" ]; then
|
||||||
rm -rf /tmp/ssh-*
|
rm -rf /tmp/ssh-*
|
||||||
eval $(ssh-agent -s) > /dev/null
|
eval $(ssh-agent -s) > /dev/null
|
||||||
|
@ -6,7 +5,3 @@ else
|
||||||
export SSH_AGENT_PID=$(pgrep ssh-agent)
|
export SSH_AGENT_PID=$(pgrep ssh-agent)
|
||||||
export SSH_AUTH_SOCK=$(find /tmp/ssh-* -name agent.*)
|
export SSH_AUTH_SOCK=$(find /tmp/ssh-* -name agent.*)
|
||||||
fi
|
fi
|
||||||
{{- else -}}
|
|
||||||
SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
|
|
||||||
export SSH_AUTH_SOCK
|
|
||||||
{{ end }}
|
|
||||||
|
|
Loading…
Reference in New Issue