composer使用国内镜像还是很慢?

composer 下载包时,尽管已经更换为国内镜像了https://packagist.phpcomposer.com,但是还是会报错

Content-Length mismatch, received 32372 bytes out of the expected 480707 
https://packagist.phpcomposer.com could not be fully loaded, package information was loaded from the local cache and may be out of date

还是会很慢!!!!

解决办法

1、清除缓存

composer clear-cache

2、如果还是慢,更换为阿里镜像
地址:https://mirrors.aliyun.com/composer/
全局配置

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

取消配置

composer config -g --unset repos.packagist

当前项目配置

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

取消配置

composer config --unset repos.packagist

对你有用吗?有用就点个赞呗!!!!!!!

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。