Created
September 20, 2016 12:26
-
-
Save SteveRohrlack/29a3e70ef576ade55552bf0938497f91 to your computer and use it in GitHub Desktop.
capistrano-dynamic-ssh-executable-path
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
# tested for capistrano 3.6.1 | |
Rake::Task["deploy:check"].clear_actions | |
namespace :deploy do | |
task check: :'git:wrapper' do | |
on release_roles :all do | |
execute :mkdir, "-p", "#{fetch(:tmp_dir)}/#{fetch(:application)}/" | |
upload! StringIO.new("#!/bin/sh -e\nexec /usr/bin/env ssh -o PasswordAuthentication=no -o StrictHostKeyChecking=no \"$@\"\n"),fetch(:git_wrapper_path) | |
execute :chmod, "+x", fetch(:git_wrapper_path) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment