windows下安装composer抛出Composer\Downloader\TransportException异常解决办法
1. 把默认的 secure-http 改成false
composer config -g secure-http false
2. 修改配置文件
#修改全局文件(推荐)
composer config -g repo.packagist composer https://packagist.phpcomposer.com
#修改当前配置文件
composer config repo.packagist composer https://packagist.phpcomposer.com
最后修改composer.json 文件
{
"repositories": {
"packagist": {
"type": "composer",
"url": "https://packagist.phpcomposer.com"
}
}
}
作者:lxlry
出处:http://www.cnblogs.com/lxlry/
文章不足之处,还请谅解!本文会不断完善更新,转载请保留出处。如果帮到了您,烦请点赞,以资鼓励。