2011-08-23 75 views
4

我有問題部署通過Capistrano v2.8.0非常新capifony - 這是我第一次capistrano/capifony部署。Capifony部署不能「git克隆」

我已經成功完成了cap deploy:setup,現在我需要執行cap deploy:cold。 SSH通信效果很好,但它不能執行,因爲SSH權限的git克隆命令:

* executing "git clone -q [email protected]:palmic/www.myproject.com.git /home/palmic/web/hostik.cz/palmic/releases/20110823122821 && cd /home/palmic/web/hostik.cz/palmic/releases/20110823122821 && git checkout -q -b deploy 7407672c0a59ad631ea2f1f1d71fb15c2f68ac30 && (echo 7407672c0a59ad631ea2f1f1d71fb15c2f68ac30 > /home/palmic/web/hostik.cz/palmic/releases/20110823122821/REVISION)" 
    servers: ["hostik.cz"] 
    [hostik.cz] executing command 
** [hostik.cz :: err] Permission denied (publickey). 
** fatal: The remote end hung up unexpectedly 
    command finished in 3123ms 
*** [deploy:update_code] rolling back 
    * executing "rm -rf /home/palmic/web/hostik.cz/palmic/releases/20110823122821; true" 
    servers: ["hostik.cz"] 
    [hostik.cz] executing command 
    command finished in 164ms 

當我登錄到SSH會話,並把這種manualy它要求SSH密碼。 當我填寫相同的密碼,我喜歡:scm_passphrase在deploy.rb中,然後克隆成功完成。 所以它看起來像capistrano無法填寫我的設置上的密碼。

順便說一句。 ssh_options [:forward_agent] = true/false 確實沒有任何東西有人知道爲什麼?(我有代理轉發在我的〜/ .ssh/config中允許):

Host *hostik.cz 
    ForwardAgent yes 
Host * 
    ForwardAgent no 

我deploy.rb:

set :application, "app" 
set :domain,  "hostname" 
set :deploy_to, "remotepath" 
set :use_sudo, false 

set :repository, "[email protected]:palmic/myproject.git" 
set :scm,   :git 
set :user, "my remote username" 
set :scm_passphrase, "my ssh passphrase on remote host" 
set :branch, "git project deploy branchname" 
set :scm_verbose, true 

role :web,  domain       # Your HTTP server, Apache/etc 
role :app,  domain       # This may be the same as your `Web` server 
role :db,   domain, :primary => true  # This is where Rails migrations will run 


set :keep_releases, 3 


ssh_options[:forward_agent] = true 

我知道這不是任何原始的bug和IAM缺少的東西,是否有人知道?

回答

7

你可以在你的deploy.rb補充一點:

default_run_options[:pty] = true 
+0

絕對偉大,謝謝! – palmic

+0

不客氣! – Daan