add wsl ssh agent setup
This commit is contained in:
parent
2a4417342c
commit
061cce7b7d
1 changed files with 11 additions and 0 deletions
11
dot_bashrc.d/wsl-ssh-agent.sh.tmpl
Normal file
11
dot_bashrc.d/wsl-ssh-agent.sh.tmpl
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{{- if (eq .chezmoi.os "linux") -}}
|
||||||
|
{{- if (contains "microsoft" .chezmoi.kernel.osrelease) -}}
|
||||||
|
if [ -z "$(pgrep ssh-agent)" ]; then
|
||||||
|
rm -rf /tmp/ssh-*
|
||||||
|
eval $(ssh-agent -s) > /dev/null
|
||||||
|
else
|
||||||
|
export SSH_AGENT_PID=$(pgrep ssh-agent)
|
||||||
|
export SSH_AUTH_SOCK=$(find /tmp/ssh-* -name agent.*)
|
||||||
|
fi
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
Loading…
Add table
Add a link
Reference in a new issue