我想部署一个 rails 3.2 应用程序,在控制台中我看到这个错误:
[deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: IP_ADDRESS (Net::SSH::AuthenticationFailed: deploy)
connection failed for: IP_ADDRESS (Net::SSH::AuthenticationFailed: deploy)
我的部署文件:
set :domain , "DOMAIN"
set :application, "APP_NAME"
set :repository, "MY_REPO"
set :scm, :git
set :scm_verbose, true
set :user, "deploy"
set :use_sudo, false
set :deploy_to, "/var/www/vhosts/default/htdocs/camplist_de/public/#{application}"
set :deploy_via, :remote_cache
set :branch, "master"
role :web, "IP_ADDRESS"
role :app, "IP_ADDRESS"
role :db, "IP_ADDRESS", :primary => true
after "deploy:restart", "deploy:cleanup"
after "deploy", "deploy:bundle_gems"
after "deploy:bundle_gems", "deploy:restart"
namespace :deploy do
task :bundle_gems do
run "cd #{deploy_to}/current && bundle install vendor/gems"
end
task :start do ; end
task :stop do ; end
task :restart, :roles => :app, :except => { :no_release => true } do
run "touch #{File.join(current_path,'tmp','restart.txt')}"
end
end
这里的代码中有占位符而不是域和 ip,而不是在我的原始部署文件中。
我无法定位错误,需要一些帮助。