palmic
palmic

Reputation: 1856

Capifony deploy cannot "git clone"

I have problem to deploy via very fresh capifony up on Capistrano v2.8.0 - it's my first capistrano/capifony deploy.

I have successfully done cap deploy:setup and now i need to execute cap deploy:cold. SSH communication works well but it cannot execute git clone command because of ssh permissions:

  * 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

When i login into ssh session and call this manualy it request ssh passphrase. When i fill up the same passphrase which i have like :scm_passphrase in deploy.rb, then clone is successfully done. So it looks like capistrano cannot fill up passphrase on my setup.

BTW. ssh_options[:forward_agent] = true/false does totaly nothing does anybody knows why?? (i have agent forwarding allowed in my ~/.ssh/config):

Host *hostik.cz
  ForwardAgent yes
Host *
  ForwardAgent no

my 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

I know it's not any original bug and iam missing something, does anybody know?

Upvotes: 4

Views: 1251

Answers (1)

Daan
Daan

Reputation: 10304

You could add this in your deploy.rb:

default_run_options[:pty] = true

Upvotes: 7

Related Questions