1

using the command line it works:

$ ssh user@remote.vm.net
password:
> echo ping
ping

with capistrano:

# set :use_sudo, true
set :pty, true
set :user, 'user'
set :password, 'password'

set :stage, :production
role :web, 'remote.vm.net'

task :ping do
  on roles(:web) do
    execute 'echo ping'
  end
end

it doesn't:

$ cap production ping
INFO [7db945a1] Running /usr/bin/env echo ping on remote.vm.net
DEBUG [7db945a1] Command: echo ping
cap aborted!
Net::SSH::AuthenticationFailed

What am I missing?

AJcodez
  • 233
  • 1
  • 4
  • 11

1 Answers1

1

I could be wrong, but I want to say the execute command doesn't run a shell. echo is a command provided by the shell. Try using the "run" command instead of "execute".

Also note that both run and execute are deprecated in the newest versions.

mfarver
  • 2,576
  • 14
  • 16