2
I work in a public body and here the access is very restricted. I have been facing problems when trying to run "Composer install" or "Composer update", this also goes for pro NPM or Bower.
Follow error details when trying to run "Composer update":
The "https://packagist.org/packages.json" file could not be downloaded:
SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
The same thing happened when trying to "clone" and "push" in git, but you could cheat using
GIT_SSL_NO_VERIFY=true git clone https://repositório
I have already downloaded the ca-cert.pem certificate and set up php.ini to get the correct certificate path, but nothing worked.
Return of Composer diagnose:
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: FAIL
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded:
SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
Checking github.com rate limit: FAIL
[Composer\Downloader\TransportException] The "https://api.github.com/rate_limit" file could not be downloaded:
SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
Checking disk free space: OK
Checking composer version:
[Composer\Downloader\TransportException]
The "https://getcomposer.org/version" file could not be downloaded:
SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
diagnose
Has anyone had similar problems?
You’re after an authenticated proxy?
– gmsantos
Yes. We have a proxy and firewall that blocks, for example, personal emails.
– buback
Does this proxy require you to enter a user and password? Run
– gmsantos
I don’t need a username and password. I actually think it authenticates when I log on to Windows.
– buback
I had a similar problem, but it was because of mandatory proxy authentication.
– gmsantos
How did you solve it? I take a test too.
– buback
Let’s go continue this discussion in chat.
– gmsantos
Probably the firewall that controls access to the Internet makes that sure exchange to be able to analyze the content of HTTPS connections. It’s an official "man-in-the-Middle attack," and the security that the firewall sends is not signed by an CA.
– epx
Friend, I’m having the same problem, can you solve? how?
– Leandro Macedo
@Leandromacedo, the problem was with SSL certificate. Our firewall validates all certificates before completing the request. Firewall rules needed to be created to free packagist, git, and more.
– buback