2011-08-23 72 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