Created
September 6, 2016 16:06
-
-
Save jbbarth/e78bfb6d81f475d0d53ac6c50e0c634f to your computer and use it in GitHub Desktop.
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 | |
if [ "$1" == "clone" ]; then | |
repo=$(echo $3|sed 's#.*/##') | |
key="$HOME/.ssh/id_rsa_$repo" | |
if [ -e "$key" ]; then | |
export GIT_SSH="ssh -i $key -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" | |
fi | |
fi | |
git $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment