I used the default composer configuration to install laravel. Now I switch to domestic mirroring and install a third-party package, and it prompts this
[Composer\Downloader\TransportException]
The "https://packagist.phpcomposer.com/packages.json" file could not be downloaded: Peer certificate CN=`*.b0.upaiy
un.com' did not match expected CN=`packagist.phpcomposer.com'
Failed to enable crypto
failed to open stream: operation failed
None of the online solutions worked. I tried many times and still got this error, so I added it where it should be added
"repositories": {
"packagist": {
"type": "composer",
"url": "https://packagist.phpcomposer.com"
}
}
Is it a certificate problem? Where do I need to modify it?
I still haven’t been able to solve the problem. I gave up the domestic package and shared the directory through samba of the Linux virtual machine. Then cd to the directory under windows and used composer under windows to install the expansion package. It was quite smooth and fast. It is still a foreign image. default allocation. It may be because the virtual machine is CentOS5.5 and the openssl version is too low (personal guess), so I’ve posted it. . .
I also encountered this problem, and I couldn’t find the answer, so sad.
OpenSSL configuration issues
See here for details