Created
November 29, 2016 13:47
-
-
Save colonelpopcorn/f77465fb624c4156e96ce9d85c12aade to your computer and use it in GitHub Desktop.
Loops through an array of paths to ssh keys and adds them to the agent in a git bash for windows session. Still requires passwords.
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
#declares an array of keys to loop through and add to the ssh-agent, run before a git bash session on windwows. | |
#bin/sh | |
declare -a keys=("/c/users/jonathan/path/to/key" "/c/users/jonathan/path/to/other/key") | |
eval $(ssh-agent -s) | |
for i in "${keys[@]}"; do | |
ssh-add "$i" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment