I have a Rails app that I’m trying to deploy with Capistrano (which I’ve never used before today). When I run cap deploy, I get a DNS spoofing warning. I’ve pasted the output here.
Even if I delete ~/.ssh/known_hosts, I still get the spoofing warning. Also, I can SSH into my server just fine, without any spoofing warning. (I have RSA keys set up.)
Any idea why this could be happening? Here is my config/deploy.rb:
require "bundler/capistrano"
set :user, "jason"
set :domain, "sniphq.com"
set :application, "Snip"
set :repository, "ssh://jason@sniphq.com/var/git/snip.git"
set :scm, "git"
set :branch, "master"
set :git_shallow_clone, true
set :scm_verbose, true
role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your `Web` server
role :db, domain, :primary => true # This is where Rails migrations will run
set :deploy_to, "/home/jason/snip-cap"
set :deploy_via, :export
# if you're still using the script/reaper helper you will need
# these http://github.com/rails/irs_process_scripts
# If you are using Passenger mod_rails uncomment this:
namespace :deploy do
task :start do ; end
task :stop do ; end
task :restart, :roles => :app, :except => { :no_release => true } do
run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
end
end
Your server sniphq.com is trying to access itself when cloning your repo from
ssh://jason@sniphq.com/var/git/snip.git.This may cause the warning as well if the known_hosts contain a different ip for that name.
Try deleting
/home/jason/.ssh/known_hostson the server as well or simply remove line 3 there.