Capifony Symfony2部署

时间:2015-04-27 08:34:24

标签: symfony web-deployment capifony

我在尝试将Symfony2应用程序部署到生产服务器时遇到此错误。

--> Downloading Composer
  * executing "sh -c 'cd /home/myproject/releases/20150427081943 && curl -s http://getcomposer.org/installer | php'"

Preparing to execute command: "sh -c 'cd /home/myproject/releases/20150427081943 && curl -s http://getcomposer.org/installer | php'"
Execute ([Yes], No, Abort) ?  |y|  y

  servers: ["myproject.net"]
    [myproject.net] executing command
 ** [out :: myproject.net] <html>
 ** [out :: myproject.net] <head><title>302 Found</title></head>
 ** [out :: myproject.net] <body bgcolor="white">
 ** [out :: myproject.net] <center><h1>302 Found</h1></center>
 ** [out :: myproject.net] <hr><center>nginx</center>
 ** [out :: myproject.net] </body>
 ** [out :: myproject.net] </html>
    command finished in 156ms

所以curl -s http://getcomposer.org/installer|php命令返回302,我不知道如何在我的脚本中解决这个问题。

我在getcomposer.org上看到curl使用-S标记添加了-s标记,如curl -sS http://getcomposer.org/installer|php

1 个答案:

答案 0 :(得分:1)

几个小时前,Composer网站(https://getcomposer.org/)开始使用302响应将所有HTTP流量重定向到HTTPS。

然而,问题是Capifony仍然指向安装程序的HTTP位置,并且curl没有遵循重定向,因为make / -L标志不是集。

你不是唯一有这个问题的人,以及Capifony are already working on this的人。

同时,请参阅this answer on another question了解解决方法:

  

为了避免从错误的网址下载capifony,我添加了:

--location
     

这是有效的,因为capifony检查composer.phar是否已经存在   现在,如果是,它会警告你,但无论如何都要继续

更新:问题现已修复,将Capifony更新为version 2.8.5