【发布时间】:2010-03-14 15:32:01
【问题描述】:
我正在尝试通过在 Dreamhost 上使用 Passenger 和 Capistrano 来部署我的 rails 应用程序。我使用 Git 作为版本控制,我们从 GitHub 购买了一个帐户。
我已经在我的本地机器上安装了所有必需的 gems、Passenger 和 Capistrano,并且我已经在我的本地机器上从 GitHub 克隆了我的项目存储库。
根据 Dreamhost 的支持,他们的服务器上也有Passenger、Ruby、Rails 等。
我目前正在关注这篇文章http://github.com/guides/deploying-with-capistrano 进行部署。
以下是我的 deploy.rb。
default_run_options[:pty] = true
ssh_options[:forward_agent] = true
# be sure to change these
set :user, 'gituser'
set :domain, 'github.com'
set :application, 'MyProjectOnGit'
#git@github.com:MyProjectOnGit.git
# the rest should be good
set :repository, "git@github.com:MyProjectOnGit.git"
set :deploy_to, "/ruby.michaelsync.net/"
set :deploy_via, :remote_cache
set :scm, 'git'
set :branch, 'master'
set :git_shallow_clone, 1
set :scm_verbose, true
set :use_sudo, false
set :git_enable_submodules, 1
server domain, :app, :web
role :db, domain, :primary => true
set :ssh_options, { :forward_agent => true }
namespace :deploy do
task :restart do
run "touch #{current_path}/tmp/restart.txt"
end
end
当我运行“cap deploy”时,我收到以下错误。
[deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: github.com (Net::SSH::AuthenticationFailed: gituser) connection failed for: github.com (Net::SSH::AuthenticationFailed: gituser)
提前谢谢..
【问题讨论】:
标签: ruby-on-rails