'Authenticity of host' message with Rsync

116 views
Skip to first unread message

mafordha

unread,
Apr 10, 2012, 1:05:10 PM4/10/12
to capis...@googlegroups.com
Hi there. I am attempting to write a little recipes that using rsync to copy some images to my server. It looks like this:

  task :upload_images, roles: :app do
    run "rsync -r -u -v images/ #{user}@#{address}:#{shared_path}/images"
  end

I can run the command fine directly on the command line, but when run via Capistrano I get a 'authenticity of host '...' can't be established.' message, despite the fact that I can run the regular cap:deploy stuff fine. After saying "yes" to the "Are you sure you want to continue connecting" message, it hangs forever.

Any ideas why this command isn't connecting to the server properly? Thanks!

mafordha

unread,
Apr 10, 2012, 2:28:27 PM4/10/12
to capis...@googlegroups.com
Answered by own question. I had to wrap the command in system() to run locally. Duh :)

Rob Hunter

unread,
Apr 10, 2012, 7:59:21 PM4/10/12
to capis...@googlegroups.com

As well as Ruby's `system`, there's also Capistrano's `run_locally` which plays nice with Capistrano logging and error catching. (ie it works just the same way `run` works, but locally)
--
Rob Hunter
(typed with my thumbs)

On Apr 10, 2012 1:28 PM, "mafordha" <mafo...@gmail.com> wrote:
Answered by own question. I had to wrap the command in system() to run locally. Duh :)

--
* You received this message because you are subscribed to the Google Groups "Capistrano" group.
* To post to this group, send email to capis...@googlegroups.com
* To unsubscribe from this group, send email to capistrano+...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en
Reply all
Reply to author
Forward
0 new messages