我有一个Rails应用程序,我正在尝试使用Capistrano部署(我今天以前从未使用过)。当我运行cap deploy
时,我收到DNS欺骗警告。我已粘贴输出here。
即使我删除~/.ssh/known_hosts
,我仍然会收到欺骗警告。此外,我可以很好地SSH到我的服务器,没有任何欺骗警告。 (我设置了RSA密钥。)
知道为什么会这样吗?这是我的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
答案 0 :(得分:0)
从
克隆您的回购邮件时,您的服务器 sniphq.com 正在尝试访问自己 ssh://jason@sniphq.com/var/git/snip.git
。
如果known_hosts包含该名称的不同ip,则可能会发出警告。
尝试删除服务器上的/home/jason/.ssh/known_hosts
,或者只删除那里的第3行。