2012-10-05 4 views
0

나는 Linode에서 레일즈 앱을 설치하려고하는데 카피스트라노 설치를 시도하는 단계에 있습니다.capistrano로 배포하고 '호스트 키 확인에 실패했습니다.' promble

배포하려는 서버와 동일한 서버에 git server setup이 있습니다. 나는 나의 SSH 키 셋업 (나는 생각한다)을 가지고있다. 적어도 나는 아무 문제없이 SSH를 할 수있다.

오류없이 'cap deploy : setup'및 'cap deploy : check'를 실행하십시오.

하지만 내가 실행하려고하면 다음 '캡 배포 마이그레이션'나는 수를 : 내 VPS를 연결하는 SSH를 사용할 수 있습니다

set :user, 'railsu' 
set :domain, 'XX.207.243.215' 
set :application, 'mini-saler' 
# adjust if you are using RVM, remove if you are not 
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) 
require "rvm/capistrano" 
set :rvm_ruby_string, '1.9.3' 
set :rvm_type, :user 
# file paths 
set :repository, "[email protected]#{domain}:mini-saler.git" 
set :deploy_to, "/home/railsu/bianbian.com" 
# distribute your applications across servers (the instructions below put them 
# all on the same server, defined above as 'domain', adjust as necessary) 
role :app, domain 
role :web, domain 
role :db, domain, :primary => true 


# miscellaneous options 
set :deploy_via, :remote_cache 
set :scm, 'git' 
set :branch, 'master' 
set :scm_verbose, true 
set :use_sudo, false 
set :rails_env, :production 

namespace :deploy do 
    desc "cause Passenger to initiate a restart" 
    task :restart do 
    run "touch #{current_path}/tmp/restart.txt" 
    end 
    desc "reload the database with seed data" 
    task :seed do 
    run "cd #{current_path}; rake db:seed RAILS_ENV=#{rails_env}" 
    end 
end 

after "deploy:update_code", :bundle_install 
desc "install the necessary prerequisites" 
task :bundle_install, :roles => :app do 
    run "cd #{release_path} && bundle install" 
end 

[email protected]:~/mini-saler$ cap deploy:migrations 
    * executing `deploy:migrations' 
    * executing `deploy:update_code' 
    updating the cached checkout on all servers 
    executing locally: "git ls-remote [email protected]:mini-saler.git master" 
    command finished in 12446ms 
    * executing "if [ -d /home/railsu/bianbian.com/shared/cached-copy ]; then cd /home/railsu/bianbian.com/shared/cached-copy && git fetch origin && git fetch --tags origin && git reset --hard 8e8aa8f849a9438851a3767b338ab711d6470299 && git clean -d -x -f; else git clone [email protected]:mini-saler.git /home/railsu/bianbian.com/shared/cached-copy && cd /home/railsu/bianbian.com/shared/cached-copy && git checkout -b deploy 8e8aa8f849a9438851a3767b338ab711d6470299; fi" 
    servers: ["XX.207.243.215"] 
    [XX.207.243.215] executing command 
** [XX.207.243.215 :: out] Cloning into /home/railsu/bianbian.com/shared/cached-copy... 
** [XX.207.243.215 :: err] Host key verification failed. 
** [XX.207.243.215 :: err] fatal: The remote end hung up unexpectedly 
    command finished in 2009ms 
failed: "rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell '1.9.3' -c 'if [ -d /home/railsu/bianbian.com/shared/cached-copy ]; then cd /home/railsu/bianbian.com/shared/cached-copy && git fetch origin && git fetch --tags origin && git reset --hard 8e8aa8f849a9438851a3767b338ab711d6470299 && git clean -d -x -f; else git clone [email protected]:mini-saler.git /home/railsu/bianbian.com/shared/cached-copy && cd /home/railsu/bianbian.com/shared/cached-copy && git checkout -b deploy 8e8aa8f849a9438851a3767b338ab711d6470299; fi'" on XX.207.243.215 

deploy.rb.

답변

2

cap deploy:setup 또는 cap deploy:check에서 git 명령을 호출 한 경우 기억이 안납니다. 나는 존재하지 않는다고 생각합니다.

gitolite를 사용한다고 가정하면 railsu 사용자의 공개 키가 keydir 디렉토리에 있는지 확인하십시오.

아니면 에이전트 전달이 원하는 것입니까? Deploying with Capistrano이 도움을 줄 수 있습니다.

관련 문제