美文网首页
为常见的包管理器设置国内镜像

为常见的包管理器设置国内镜像

作者: Gundy_ | 来源:发表于2016-08-08 09:42 被阅读121次

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 

淘宝 NPM 镜像官网

Pip
选择阿里云镜像,创建配置文件 ~/.pip/pip.conf
,然后粘贴以下配置

  [global]
   index-url = http://mirrors.aliyun.com/pypi/simple/
 
  [install]
  trusted-host=mirrors.aliyun.com

阿里云 Pip 镜像配置说明

Ruby-China 镜像配置说明

相关文章

网友评论

      本文标题:为常见的包管理器设置国内镜像

      本文链接:https://www.haomeiwen.com/subject/ibtrsttx.html