2

Im having setup a empty git repo bare on the server side and everything setup.

Cap deploy:setup does this

    [109.etc] env RAILS_ENV=production sh -c 'git clone git@109.etc:srv/paintings.git /srv/paintings/current'
 ** [out :: 109.etc] Initialized empty Git repository in /srv/paintings/current/.git/
 ** [out :: 109.etc] The authenticity of host '109.etc (109.etc)' can't be established.
 ** [out :: 109.etc] RSA key fingerprint is e9:af:d6:d3:0e:f5:de:a3:4a:31:6e:8e:4a:c7:b7:ee.
 ** [out :: 109.etc] Are you sure you want to continue connecting (yes/no)?

*When I type yes or y it just "hangs" nothing seem to happen... * already tried --debug after the cap deploy:setup what could be wrong?

Rubytastic
  • 15,001
  • 18
  • 87
  • 175

1 Answers1

2

Capistrano is essentially non-interactive; if a prompt like this pops up you can't just tell it "yes", unfortunately, since commands you type in aren't sent to the remote host. You'll have to do the "yes"-ing manually.

To get around this problem, add the host's key to the known_hosts file for that user. So, SSH into whatever machine is doing the deploy, su into that user, and try SSHing into 109.etc. You'll receive the same warning prompt and you'll be able to enter "yes" in, and this time it'll work. Afterwards, cap deploy as per normal and you won't receive this message anymore.

Veraticus
  • 15,944
  • 3
  • 41
  • 45
  • Added like suggested but problem on cap deploy:setup still there, i can just do ssh root@myhost now without a password prompt. The authenticity of host cannot be.. still persist though :( – Rubytastic Mar 15 '12 at 16:02
  • Are you deploying from the root user of that machine? You have to SSH into ```109.etc``` from whatever user is actually performing the deploy. – Veraticus Mar 15 '12 at 16:04
  • Fixed it I had the host in my /etc/hosts and used the alias instead of Ip now I have new error The --deployment flag requires a Gemfile.lock. Please make sure you have checked your Gemfile.lock into version control before deploying. I check your answer as accepted one thx a lot for the help this bugged me like 3 days. – Rubytastic Mar 15 '12 at 16:06