"https://packagist.phpcomposer.com/packages.json" file could not be downloaded: Peer certificate CN=`*.b0.upaiyun.com' did not match expected CN=`packagist.phpcomposer.com'
Failed to enable crypto
Failed to enable crypto
failed to open stream: operation failed
出现这个问题的原因是 compose 全局下载换为中国镜像。当时执行的命令:
composer config -g repo.packagist composer https://packagist.phpcomposer.com
要解决这个问题,只需把源换回来吧:
composer config -g repo.packagist composer https://packagist.phpcomposer.com
或者:
php composer.phar -g repo.packagist composer https://packagist.org/
如果下载不了,则这是代理上网
/etc/profile下设置:
http_proxy=IP:8080
https_proxy=IP:8080
export http_proxy https_proxy no_proxy