windows下安装composer抛出Composer\Downloader\TransportException异常解决办法

1. 把默认的 secure-http 改成false

composer config -g secure-http false

 

. 修改配置文件

#修改全局文件(推荐)

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"

        }

    }

}

posted on 2016-12-29 14:40  lxlry  阅读(1715)  评论(0编辑  收藏  举报

导航