Reputation: 41
I am getting an issue of 400 bad request connecting over http, and it seems the package only wants to be installed via http. I tried an override in composer.json as tried by others as workaround to force https - but that doesn't seem to work. I'm not behind a firewall. Mac OS 10.10.3
Issue :
composer diagnose
Checking composer.json: FAIL
the property name is required
the property description is required
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: FAIL
[Composer\Downloader\TransportException] The "http://packagist.org/packages.json" file could not be downloaded (HTTP/1.1 400 Bad Request)
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking composer version: OK
[Composer\Downloader\TransportException]
The "http://packagist.org/p/provider-2013$c2596c5d04e7701561420666ba120ede9429a69c75b732a5a01b18ebb3d64e53.json" file could not be downloaded (HTTP/1.1 400 Bad Request)
Composer.json
{
"repositories": [
{ "packagist": false }
,
{
"type": "composer",
"url": "https://packagist.org"
}
]
}
Composer version 1.0-dev (92faf1c7a83a73794fb914a990be435e1df373ca) 2015-07-14 12:37:15
Upvotes: 4
Views: 6192
Reputation: 1
I am installing Yii2 on my Mac OS X El Capitan 10.11.06 and resolved as follows.
In my case I had to close an application (antivirus/web security app)
FortiClient Aplication Close
Then try again to make the composer command
composer global require "fxp/composer-asset-plugin:^1.2.0"
Upvotes: 0
Reputation: 4383
For me quitting Forticlient (antivirus/web security app) removed the 400 bad request error and allowed me to download laravel via composer.
Maybe you have antivirus software or similar that is interfering.
I'm on Mac OS X 10.11
Upvotes: 5
Reputation: 11
I have same problem and I use composer diagnose -vvv
Checking git settings: Executing command (CWD): git config color.ui
OK
Checking http connectivity to packagist: Downloading http://packagist.org/packages.json
FAIL
[Composer\Downloader\TransportException] The "http://packagist.org/packages.json" file could not be downloaded (HTTP/1.1 400 Bad Request)
Because I install Forticlient, stop it and everything work fine.
Upvotes: 1