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
|
||||
|
||||
if [[ "$(uname -r)" =~ "microsoft" ]] ; then
|
||||
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.*")
|
||||
if command -v keychain > /dev/null ; then
|
||||
keychain -q --nogui "$HOME/.ssh/id_ed25519"
|
||||
source "$HOME/.keychain/$(hostname)-sh"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue