[Composer\Downloader\TransportException] The “https://mirrors.aliyun.com/composer/p/provider-2015

[Composer\Downloader\TransportException] The “https://mirrors.aliyun.com/composer/p/provider-2015_第1张图片

今天执行composer命令时报以上错误

原因: 是composer的源地址错误

修改前如图 composer config -l -g

[Composer\Downloader\TransportException] The “https://mirrors.aliyun.com/composer/p/provider-2015_第2张图片

更换源命令

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

 composer config -g --unset repos.packagist

执行后结果如图

[Composer\Downloader\TransportException] The “https://mirrors.aliyun.com/composer/p/provider-2015_第3张图片

这样就成功了

这里附上阿里云镜像地址:阿里云Composer镜像站-阿里云开发者社区Composer是 PHP 用来管理依赖(dependency)关系的工具,阿里云推出的Composer中国区全量镜像,与 Packagist 官方实时同步,服务快速、稳定。https://developer.aliyun.com/composer

你可能感兴趣的:(composer,composer,php)