Composer to completely disable https

my network does not work with https, so

composer.phar install 

throws

  [Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: Failed to enable crypto failed to open stream: operation failed 

I used

 { "packagist": false }, { "type": "composer", "url": "http://packagist.org", "options": { "ssl": { "verify_peer": "false" } } } 

like http balance, but again it falls to another point:

 Installing dependencies - Installing symfony/translation (v2.4.0) Downloading: 100% Downloading: 100% Downloading: 100% [Composer\Downloader\TransportException] The "https://api.github.com/repos/symfony/Translation/zipball/0919e0fc709217f8c9e5049f2603419fdd4a34ff" file could not be downloaded: Failed to enable crypto failed to open stream: operation failed 

my problem is only with TLSv1, previous versions of SSL should work as browsers work correctly.

how to do this, the problem also exists in other cmd tools that depend on https such as npm, bower, git, curl, ...

+8
ssl composer-php
source share
5 answers

You can disable TLS (for your specific project) using your composer.json as such:

 { "require": { "laravel/framework": "5.2.43" }, "config": { "preferred-install": "dist", "disable-tls": true, "secure-http": false } } 

NB : do not use "disable-tls": true in the configuration section.

+15
source
 composer config --global disable-tls true composer config --global secure-http false 
+12
source

You cannot disable SSL with Composer. Even if it works as in your setup, you cannot control the source URLs of any package you use. Some of them offer nothing without SSL, so you MUST use SSL.

I think this is the best idea to make SSL work. Have you tried composer diag and looked where the problem is?

+4
source

It's good. This will work. You are just a mismatch:

 "options": { "ssl": { "verify_peer": false } } 
+4
source

to disable https totaly (not recommended) you need to add "secure-http": false in the configuration file of the composer.json file as follows:

 "name": "laravel/laravel", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "require": { "laravel/framework": "5.3.*", }, . . . "config": { "preferred-install": "dist", "bin-dir": "vendor/bin/", "secure-http": false }, "minimum-stability": "dev" 
+3
source

All Articles