我运行了一个提交,然后部署并部署了我的部署。使用命令行ssh进入服务器没有问题,我在一小时前完成了多次多次部署,没有任何问题。这是一个Rails 4应用程序:
我做的承诺:
[master 0c92b35] twilio
11 files changed, 1 insertion(+)
create mode 100644 app/assets/images/add.png
create mode 100644 app/assets/images/movie.png
create mode 100644 app/assets/images/playlist.png
create mode 100644 app/assets/images/recipe.png
create mode 100644 tmp/cache/assets/development/sprockets/2086c2b65ce01314d6232b55cc84bc9f
create mode 100644 tmp/cache/assets/development/sprockets/4d8b49ba8a5b8572d8f08833b225a279
create mode 100644 tmp/cache/assets/development/sprockets/9d4f937775816a3dbe9de2dee94230a1
create mode 100644 tmp/cache/assets/development/sprockets/c69324afb35cfd4bd4494d80f5647107
create mode 100644 tmp/cache/assets/development/sprockets/e9bceb7d6e65c52be41b8d3d4afe2044
create mode 100644 tmp/cache/assets/development/sprockets/f634b1ecacd2fa5a47b6c29762ec28ac
create mode 100644 tmp/pids/server.pid
部署时控制台中出现错误:
FATFROG:fix andrew$ cap deploy
triggering load callbacks
* 2014-02-08 20:32:53 executing `deploy'
* 2014-02-08 20:32:53 executing `deploy:update'
** transaction: start
* 2014-02-08 20:32:53 executing `deploy:update_code'
executing locally: "git ls-remote git@github.com:blackpond/gift.git master"
command finished in 1180ms
* executing "git clone -q -b master git@github.com:blackpond/gift.git /home/deploy/giftlift/releases/20140209033254 && cd /home/deploy/giftlift/releases/20140209033254 && git checkout -q -b deploy 0c92b3555320c7881c70a37714558c09472b3d31 && (echo 0c92b3555320c7881c70a37714558c09472b3d31 > /home/deploy/giftlift/releases/20140209033254/REVISION)"
servers: ["107.170.47.246"]
*** [deploy:update_code] rolling back
* executing "rm -rf /home/deploy/giftlift/releases/20140209033254; true"
servers: ["107.170.47.246"]
** [deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: 107.170.47.246 (Net::SSH::AuthenticationFailed: Authentication failed for user deploy@107.170.47.246)
connection failed for: 107.170.47.246 (Net::SSH::AuthenticationFailed: Authentication failed for user deploy@107.170.47.246)
My Deploy.rb文件:
load 'deploy/assets'
require "rvm/capistrano"
require "bundler/capistrano"
set :default_environment, {
'PATH' => "/usr/local/rvm/rubies/ruby-2.0.0-p247/bin/:$PATH"
}
set :rvm_type, :user
set :application, "***"
set :repository, "***"
set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control
set :user, "deploy"
set :use_sudo, false
ssh_options[:port] = ***
default_run_options[:pty] = true
ssh_options[:forward_agent] = true
set :deploy_to, "/home/deploy/#{application}"
set :rails_env, 'production'
set :branch, "master"
role :web, "***" # Your HTTP server, Apache/etc
role :app, "***" # This may be the same as your `Web` server
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 :(得分:1)
类似问题Capistrano SSH::AuthenticationFailed, not prompting for password。我想这个修复是一样的:重新安装net-ssh。