Created
August 4, 2018 10:08
-
-
Save avisagie/9f9d92c561f150a52e9ad12a97df5dbe to your computer and use it in GitHub Desktop.
Add this to your ~/.bashrc under git bash for Windows to get ssh-agent working fairly smoothly. It only starts one ssh-agent and you only need to type your private key password once.
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 ps | grep ssh-agent &> /dev/null | |
then | |
. ~/.ssh-agent | |
else | |
ssh-agent > ~/.ssh-agent | |
. ~/.ssh-agent | |
ssh-add | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Assuming you encrypted your private key in the first place. As you do, right?
If not, do this:
ssh-keygen -o -p -f ~/.ssh/id-rsa