Created
May 25, 2020 06:12
-
-
Save ZoolWay/45806a93f8c991fa31dddaaca96df4b5 to your computer and use it in GitHub Desktop.
Clean and singleton startup of ssh-agent in WSL (add to .bashrc e.g.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ! pgrep ssh-agent > /dev/null; then | |
rm -f /tmp/ssh-auth-sock | |
eval "$(ssh-agent -s -a /tmp/ssh-auth-sock)" | |
ssh-add /mnt/c/Users/Admin/.ssh/compax-gitlab | |
else | |
export SSH_AUTH_SOCK=/tmp/ssh-auth-sock | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment