Capistrano を使用して Ruby on Rails アプリを実装しようとしています。ステージング サーバーで apache rvm を実行し、運用サーバーで nginx REE バージョンを実行しています。私もgitを使用しています。Capistrano を統合しようとしましたが、このエラーが発生しています
(Net::SSH::AuthenticationFailed: ubuntu)
ここに私の deploy.rb ファイルがあります
set :application, "capify"
# The directory on the EC2 node that will be deployed to
set :deploy_to, "/home/ubuntu/apps/#{application}"
set :keep_releases, 3
# deploy with git
set :scm, :git
set :repository, "git@github.com:username/capify.git"
set :git_shallow_clone, 1
set :branch, "master"
set :use_sudo, false
set :user, "ubuntu"
ssh_options[:keys] = ["/path/tp/key.pem"]
ssh_options[:forward_agent] = true
default_run_options[:pty] = true
# The address of the remote host on EC2 (the Public DNS address)
set :location, "ip"
# setup some Capistrano roles
role :app, location
role :web, location
role :db, location, :primary => true
after 'deploy:update_code', 'deploy:symlink_db'
namespace :deploy do
desc "Restart Application"
task :restart, :roles => :app do
run "touch #{deploy_to}/#{shared_dir}/tmp/restart.txt"
end
desc "Symlinks the database.yml"
task :symlink_db, :roles => :app do
run "ln -nfs #{deploy_to}/shared/config/database.yml #{release_path}/config/database.yml"
end
end
カピストラーノを統合する正確な問題と方法を理解できません。