Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm running Rails + Passenger under an Ubuntu AWS's instance. Now I'm trying to deploy with Capistrano, I already did my git repository (and upload it to the server) and my deploy.rb file (with capify .). I already ran cap deploy:setup and cap deploy:check successfully. But now when I try to run cap deploy it fails and I get this error:

* executing `deploy:migrations'
  * executing `deploy:update_code'
    updating the cached checkout on all servers
    executing locally: "git ls-remote ubuntu@ec2.flasheves.com:git/proyecto.git master"
    command finished in 1651ms
  * executing "if [ -d /var/www/proyecto.flasheves.com/shared/cached-copy ]; then cd /var/www/proyecto.flasheves.com/shared/cached-copy && git fetch  origin && git reset  --hard ef3ba849cd27aea4c2f6d372f47c027f495b8a4f && git clean  -d -x -f; else git clone   ubuntu@ec2.flasheves.com:git/proyecto.git /var/www/proyecto.flasheves.com/shared/cached-copy && cd /var/www/proyecto.flasheves.com/shared/cached-copy && git checkout  -b deploy ef3ba849cd27aea4c2f6d372f47c027f495b8a4f; fi"
    servers: ["proyecto.flasheves.com"]
    [proyecto.flasheves.com] executing command
 ** [proyecto.flasheves.com :: out] Initialized empty Git repository in /var/www/proyecto.flasheves.com/shared/cached-copy/.git/
 ** [proyecto.flasheves.com :: err] Host key verification failed.
 ** [proyecto.flasheves.com :: err] fatal: The remote end hung up unexpectedly
    command finished in 355ms
failed: "sh -c 'if [ -d /var/www/proyecto.flasheves.com/shared/cached-copy ]; then cd /var/www/proyecto.flasheves.com/shared/cached-copy && git fetch  origin && git reset  --hard ef3ba849cd27aea4c2f6d372f47c027f495b8a4f && git clean  -d -x -f; else git clone   ubuntu@ec2.flasheves.com:git/proyecto.git /var/www/proyecto.flasheves.com/shared/cached-copy && cd /var/www/proyecto.flasheves.com/shared/cached-copy && git checkout  -b deploy ef3ba849cd27aea4c2f6d372f47c027f495b8a4f; fi'" on proyecto.flasheves.com
share|improve this question

1 Answer 1

Remove the entry for ec2.flasheves.com your deploy server's ~/.ssh/known_hosts, it looks like the host key on ec2.flasheves.com changed and ssh is killing the connection since it could be a hijack.

http://www.symantec.com/connect/articles/ssh-host-key-protection

share|improve this answer
    
Thanks but I found the problem > stackoverflow.com/questions/3269578/… So > I add set :ssh_options, {:forward_agent => true} to my deploy.rb file –  eveevans Apr 27 '11 at 15:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.