composer创建新项目报错

composer create-project topthink/thinkphp ThinkPHP 报错。

 [Composer\Downloader\TransportException]
 Your configuration does not allow connections to http://packagist.org/packages.json. See https://getcomposer.org/do
 c/06-config.md#secure-http for details.

 

修复方法:换http源,更改配置不要使用https加密连接

composer config -g secure-http false
$ composer config -g repo.packagist composer http://packagist.phpcomposer.com
$ composer config -g secure-http false

 

posted on 2016-09-20 14:04  佟言无忌  阅读(712)  评论(0编辑  收藏  举报