Created
June 25, 2012 12:14
-
-
Save tyrcho/2988248 to your computer and use it in GitHub Desktop.
bash script to use ssh-agent in Windows environment
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
ssh-add -l >/dev/null 2>&1 | |
if [ $? = 2 ]; then | |
# exit-status 2 = couldn't connect to ssh-agent | |
rm $SSH_AUTH_SOCK | |
echo -n "Starting SSH agent ... " | |
eval `ssh-agent -a $SSH_AUTH_SOCK` | |
ssh-add | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have defined SSH_AUTH_SOCK=/tmp/.ssh-socket in my environment variables
This works with msysgit and git-svn or github for instance.