Composer
修改全局应用镜像
composer config -g repo.packagist composer https://packagist.phpcomposer.com
只针对项目修改, 修改项目的 composer.json
文件,加入以下配置
"repositories": {
"packagist": {
"type": "composer",
"url": "https://packagist.phpcomposer.com"
}
}
NPM
选择淘宝镜像,直接在终端贴入以下命令
npm config set registry https://registry.npm.taobao.org
Pip
选择阿里云镜像,创建配置文件 ~/.pip/pip.conf
,然后粘贴以下配置
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
网友评论