Created
July 9, 2015 07:59
-
-
Save wanabe/5a4b8783910e557cd832 to your computer and use it in GitHub Desktop.
git with ssh private key
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
| #!/bin/sh | |
| if [ -n "$GIT_SSH" ]; then | |
| echo ssh $GIT_SSH_OPT $* 1>&2 | |
| ssh $GIT_SSH_OPT $* | |
| else | |
| export GIT_SSH_OPT="-i $1" | |
| export GIT_SSH=$0 | |
| shift | |
| echo git "$*" | |
| exec git $* | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment