1.查询下镜像的地址在哪里
**MacBook-Air:api **$ composer config -gl [repositories.packagist.org.type] composer [repositories.packagist.org.url] https://mirrors.aliyun.com/composer 通常为:https?://repo.packagist.org [process-timeout] 300 这个是进程超时时间,300秒 = 5分钟,
2.改下镜像
中国全量镜像
composer config -g repo.packagist composer https://packagist.phpcomposer.com
腾讯云
composer config -g repos.packagist composer https://mirrors.cloud.tencent.com/composer/
阿里云
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
如果需要解除镜像并恢复到 packagist 官方源,请执行以下命令:
composer config -g --unset repos.packagist
原文地址:https://www.cnblogs.com/aoxueshou/p/12706693.html
时间: 2024-11-02 08:50:11