Created
January 6, 2020 04:21
-
-
Save Tantalus13A98B5F/bc86788b0a9c9df659bfc4947ca76e8b to your computer and use it in GitHub Desktop.
My Git Bash agent starting script. Setting system variables so useful to work with graphical git tools.
This file contains 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
#!/bin/bash | |
agent_run_state=$(ssh-add -l >| /dev/null 2>&1; echo $?) | |
if [ "$agent_run_state" = 2 ]; then | |
rm -rf /tmp/ssh-* | |
eval $(ssh-agent -s) | |
winpty setx SSH_AUTH_SOCK $SSH_AUTH_SOCK | |
winpty setx SSH_AGENT_PID $SSH_AGENT_PID | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment