MENU

Composer换阿里云源npm换淘宝源 yarn换淘宝源

June 2, 2020 • Read: 869 • 工具阅读设置

首先把默认的源给禁用掉

composer config -g secure-http false

再修改镜像源 这里我使用阿里的源

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

修改成功后可以先查看一下配置

composer config -g -l

第二行repositories.packagist.org.url 如果是阿里的就代表成功

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

查询初始的源

npm get registry

https://registry.npmjs.org/

设置淘宝源

npm config set registry http://registry.npm.taobao.org/
yarn config set registry http://registry.npm.taobao.org/
Last Modified: July 20, 2020