switch wsl to keychain instead of env/systemd hacks to run ssh-agent
parent
b3397de7b6
commit
131f2d8364
9
.zshrc
9
.zshrc
|
@ -106,12 +106,9 @@ if command -v zoxide > /dev/null ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$(uname -r)" =~ "microsoft" ]] ; then
|
if [[ "$(uname -r)" =~ "microsoft" ]] ; then
|
||||||
if [ -z "$(pgrep ssh-agent)" ]; then
|
if command -v keychain > /dev/null ; then
|
||||||
rm -rf /tmp/ssh-*
|
keychain -q --nogui "$HOME/.ssh/id_ed25519"
|
||||||
eval $(ssh-agent -s) > /dev/null
|
source "$HOME/.keychain/$(hostname)-sh"
|
||||||
else
|
|
||||||
export SSH_AGENT_PID=$(pgrep ssh-agent)
|
|
||||||
export SSH_AUTH_SOCK=$(find /tmp/ssh-* -name "agent.*")
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue