在使用Windows
下使用Composer
安装Yii
的时候提示错误:
[Composer\Downloader\TransportException]
Your configuration does not allow connections to http://packagist.org/packages.json. See https://getcomposer.org/doc/06-config.md#secure-http for details.
首先设置Composer
的Packagist
镜像为中国镜像,全局设置,运行代码;
composer config -g repo.packagist composer https://packagist.phpcomposer.com
然后把默认的 secure-http 改成false;运行代码;
composer config -g secure-http false
这样就可以在墙内使用Composer
快速的使用国内镜像安装你需要的项目了以及intall
需要的依赖包。