Deployment 使用capistrano部署Ruby on Rails时抛出ssh错误

Deployment 使用capistrano部署Ruby on Rails时抛出ssh错误,deployment,ruby-on-rails-3.2,capistrano,Deployment,Ruby On Rails 3.2,Capistrano,我想部署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::Authentic

我想部署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,而不是我的原始部署文件中的占位符


我无法定位错误,需要一些帮助。

您可以手动将ssh连接到服务器吗?可以。capistrano可以创建dir,但当我尝试cap deploy:cold时,它将取消。部署依赖关系正常。cap部署:设置工作正常