2012-06-19 5 views
1

카피 스트라 노를 사용하여 레일즈 애플리케이션에 루비를 구현하려고합니다. 프로덕션 서버에서 스테이지 서버 및 nginx REE 버전에서 apache rvm을 실행하고 있습니다. 나는 자식을 사용하고 있습니다. 내가 카피 스트라 노 통합하려고왔다하지만 난이 오류를 여기카피스트라노와 ubuntu ec2 인스턴스를 레일에 배포하기

(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, "[email protected]: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 

입니다 얻고있다.

+0

어떻게 당신이 일하고있어없이 그것을 시도 제안? 나도 같은 [문제] (http://stackoverflow.com/questions/30858269/sshkitrunnerexecuteerror-exception-while-running-cap-production-deployc) .. 어떤 도움을 주시겠습니까? –

답변

2

간단합니다. Capistrano는 배포 할 때 암호를 묻지 않고 SSH 키를 사용하여 대상 서버에서 사용자를 인증 할 것을 기대합니다.

(우분투)로 배포하려는 사용자가 인증 할 수없는 것 같습니다.

~/.ssh/id_rsa.pub의 내용을 /home/ubuntu/.ssh/authorized_keys 파일에 추가해보십시오.

당신이

업데이트 작동하는 암호를 입력하라는 메시지가받지 않고 컴퓨터에 ssh를 할 수있는 경우 : 귀하의 경우에 당신은 SSH 인증에 사용되는 다른 키를 정의 할 ssh_options[:keys]을 사용하고 있습니다. 이 지시자를 표준 ssh 키 (~/.ssh/id_rsa.pub에있는 키)로 기본 설정을 제거하거나 지정한 다른 키를 서버의 authorized_keys 파일에 추가 할 수 있습니다.

나는 당신이 ssh_options[:keys] 옵션 :

+0

id_rsa.pub 내용의 내용을 authorized_keys에 추가 한 후에도 동일한 오류가 발생합니다 ... –

+0

답변이 업데이트되었습니다. – Tigraine

관련 문제