问题
I'm using Capifony to deploy my Symfony2 application, but as of today it can't download composer - jenkins output:
[32m--> Downloading Composer[0m
* executing "sh -c 'cd /data/www/testing/s00110/releases/20150426161117 && curl -s http://getcomposer.org/installer | php'"
servers: ["*domain*"]
[*domain*] executing command
** [out :: *domain*] <html>
** [out :: *domain*] <head><title>302 Found</title></head>
** [out :: *domain*] <body bgcolor="white">
** [out :: *domain*] <center><h1>302 Found</h1></center>
** [out :: *domain*] <hr><center>nginx</center>
** [out :: *domain*] </body>
** [out :: *domain*] </html>
command finished in 46ms
It seems composer moved their installer to https and Capifony isn't following the redirect. Is there an option to tell capifony where to download composer from?
回答1:
A new version of Capifony, version 2.8.5, has been released a couple of hours ago, which fixes this issue.
Updating to 2.8.5 should solve your problems with the Composer download.
回答2:
There doesn't seem to be an option to set the url, but you can add your own task. To circumvent capifony downloading from the wrong url I added:
task :download_composer do
run "cd " + release_path + " && curl -s https://getcomposer.org/installer | php"
end
before "symfony:composer:update", "download_composer"
before "symfony:composer:install", "download_composer"
This works because capifony checks if composer.phar is already present, if it is it'll warn you but just continue anyway
回答3:
Just update capifony to version 2.8.4.
来源:https://stackoverflow.com/questions/29880673/capifony-cant-download-composer-not-following-redirect