我在Ubuntu AWS的实例下运行Rails + Passenger。 现在我试图部署Capistrano,我已经做了我的git仓库(并上传到服务器)和我的deploy.rb文件(与capify。)。 我已经运行了cap deploy:setup和cap 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
删除ec2.flasheves.com条目的部署服务器的~/.ssh/known_hosts ,它看起来像ec2.flasheves.com上的主机密钥已更改,ssh正在杀死连接,因为它可能是一个劫持。
http://www.symantec.com/connect/articles/ssh-host-key-protection