It sounds like Magento's severely tightened up their HTTPS on the repo.magento.com
server.
These settings are tight enough that applications that support HTTPS but use an older version of OpenSSL may have their connections rejected.
Meaning, if the version of PHP you're using to run composer.phar
is linked against and older version of PHP, you'll get the Failed to enable crypto error. You can test your version of PHP with the following code snippet.
error_reporting(E_ALL);
$context = stream_context_create();
$contents = file_get_contents('https://repo.magento.com/packages.json', false, $context);
The reason I got this error was/is the packaged version of PHP I've been using (depending on how you count) for almost 13 years was linking against an older version of SSL. The package maintainers have released a new build that seems to address these problems.
If you're using a different packaged version of PHP, you'll need to pressure the package maintainers to release a new build that fixes this, or pressure Magento to do the same.
If you're building a version of PHP yourself (by hand, via brew
, etc) then make sure you're using as modern a version of OpenSSL with modern TLS support (I may have used those words wrong, not an HTTPS/SSL expert by any stretch)
{ "http-basic": { "repo.magento.com": { "username": "a98186c7f7777dbb05d959bdb91b9729", "password": "344ce14c479f1c8eae77edb58b4ec66f" } } }
– Aman Alam Jun 23 '16 at 21:47--repository-url
isn't spelled correctly. I couldn't make the edit myself, as SE wants a minimum of 6 characters in an edit, and I didn't want to mess with your question. – ryanF Jun 24 '16 at 0:08