美文网首页
常用镜像

常用镜像

作者: 即墨灯火 | 来源:发表于2017-10-26 16:11 被阅读28次

    Maven

    # 阿里云
    <mirrors>
        <mirror>
          <id>alimaven</id>
          <name>aliyun maven</name>
        <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
          <mirrorOf>central</mirrorOf>        
        </mirror>
    </mirrors>
    

    Npm

    1. 临时使用
    npm --registry https://registry.npm.taobao.org install express
    
    1. 持久使用(个人推荐)
    npm config set registry https://registry.npm.taobao.org
    

    配置后可通过下面方式来验证是否成功

    npm config get registry或npm info express
    
    1. 通过cnpm使用
    npm install -g cnpm --registry=https://registry.npm.taobao.org
    

    使用 cnpm install package-name进行安装。

    具体参考:http://npm.taobao.org/

    Pip

    永久修改
    Linux下,修改~/.pip/pip.conf (没有就创建一个文件夹及文件。文件夹要加“.”,表示是隐藏文件夹)
    内容如下:

    [global]
    index-url = https://pypi.tuna.tsinghua.edu.cn/simple
    [install]
    trusted-host=mirrors.aliyun.com
    

    windows下,则直接在user目录中创建一个pip目录,再新建文件pip.ini。(例如:C:\Users\Administrator\pip\pip.ini)内容同上。
    see more

    相关文章

      网友评论

          本文标题:常用镜像

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