Skip to content

Instantly share code, notes, and snippets.

@git2samus
Created June 16, 2011 17:35
Show Gist options
  • Save git2samus/1029767 to your computer and use it in GitHub Desktop.
Save git2samus/1029767 to your computer and use it in GitHub Desktop.
ssh-wrapper - for use with https://gist.github.com/1004653 (buildhuman script)
#!/bin/sh
# ssh-wrapper :: helper script for git to run custom ssh commands
#
# example usage:
# GIT_SSH=ssh-wrapper GIT_SSH_KEY=my_private_key.rsa git ...
if [ -s "$GIT_SSH_KEY" ]; then
exec ssh -i "$GIT_SSH_KEY" "$@"
else
exec ssh "$@"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment