Amazon Web Service 中的 Capistrano 问题

Amazon Web Service 中的 Capistrano 问题

我在 Ubuntu AWS 实例下运行 Rails + Passenger。现在我尝试使用 Capistrano 进行部署,我已经创建了 git 存储库(并将其上传到服务器)和 deploy.rb 文件(使用 capify .)。我已经运行cap deploy:setupcap deploy:check成功。但现在当我尝试运行时,cap deploy它失败了,我收到此错误:

* executing `deploy:migrations'
  * executing `deploy:update_code'
    updating the cached checkout on all servers
    executing locally: "git ls-remote [email protected]: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   [email protected]: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   [email protected]: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

答案1

删除部署服务器的 ec2.flasheves.com 条目~/.ssh/known_hosts,看起来 ec2.flasheves.com 上的主机密钥已更改,并且 ssh 正在终止连接,因为它可能是一种劫持。

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

相关内容