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"

}

}

}

上一篇:深入理解JavaScript系列(16):闭包(Closures)


下一篇:转发 java数据结构之hashMap详解