Skip to content

Commit

Permalink
Merge pull request #104 from engineyard/plink
Browse files Browse the repository at this point in the history
[git wrapper] defend against helpful git
  • Loading branch information
martinemde committed Jul 3, 2014
2 parents d37e5fe + e85baeb commit e91026a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/engineyard-serverside/deploy.rb
Expand Up @@ -177,7 +177,10 @@ def generate_ssh_wrapper
[ -x #{path} ] || cat > #{path} <<'SSH'
#!/bin/sh
unset SSH_AUTH_SOCK
ssh -o CheckHostIP=no -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o LogLevel=INFO -o IdentityFile=#{paths.deploy_key} -o IdentitiesOnly=yes $*
# Filter command mangling by git when using `GIT_SSH` and the string `plink`
command=$(echo "$*" | sed -e "s/^-batch //")
ssh -o CheckHostIP=no -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o LogLevel=INFO -o IdentityFile=#{paths.deploy_key} -o IdentitiesOnly=yes ${command}
SSH
chmod 0700 #{path}
SCRIPT
Expand Down

0 comments on commit e91026a

Please sign in to comment.