Skip to content

Instantly share code, notes, and snippets.

@IskanderHaziev
Created January 25, 2011 15:22
Show Gist options
  • Save IskanderHaziev/795063 to your computer and use it in GitHub Desktop.
Save IskanderHaziev/795063 to your computer and use it in GitHub Desktop.
# ------------------- script
#!/bin/sh
key=$(git config ssh.key)
if [ -z "$key" ]; then
git_opts=""
else
git_opts="-i ${key}"
fi
exec ssh $git_opts "$@"
# ------------------- script
export GIT_SSH=gitssh
git config ssh.key ~/.ssh/my_cool_project1_key.pub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment