Created
May 13, 2020 20:10
-
-
Save h2xd/af2b5fc274627d578d4f1b897ef54eb1 to your computer and use it in GitHub Desktop.
Windows .bashrc to autostart the ssh agent and add your ssh-keys automatically
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
if [[ "$SSH_AUTH_SOCK" = "" ]]; then | |
# first round add the ssh agent | |
exec ssh-agent bash | |
else | |
# here you can add your ssh keys | |
# github as an example | |
ssh-add ~/.ssh/github_com_rsa | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment