当前位置:首页 > 分享 > 经验 > 正文内容

包管理换国内源

watrt6个月前 (11-07)经验1910

Pip

提供方源及使用方式
豆瓣

https://pypi.doubanio.com/simple/

pip install -i https://pypi.doubanio.com/simple/
清华大学

https://pypi.tuna.tsinghua.edu.cn/simple

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple
阿里云

https://mirrors.aliyun.com/pypi/simple/

pip install -i https://mirrors.aliyun.com/pypi/simple/

Composer

提供方源及使用方式
-

https://packagist.phpcomposer.com/

composer config -g repo.packagist composer https://packagist.phpcomposer.com
-

https://php.cnpkg.org/

composer config -g repo.packagist composer https://php.cnpkg.org
阿里云

https://mirrors.aliyun.com/composer/

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

https://mirrors.huaweicloud.com/repository/php/

composer config -g repo.packagist composer https://mirrors.huaweicloud.com/repository/php/
上海交通大学

https://packagist.mirrors.sjtug.sjtu.edu.cn/

composer config -g repo.packagist composer https://packagist.mirrors.sjtug.sjtu.edu.cn
-

https://packagist.jp/

composer config -g repo.packagist composer https://packagist.jp

NPM

提供方源及使用方式
淘宝

https://registry.npmmirror.com/

npm config set registry https://registry.npmmirror.com
pnpm config set registry https://registry.npmmirror.com
yarn config set registry https://registry.npmmirror.com
-

http://r.cnpmjs.org/

npm config set registry http://r.cnpmjs.org/
pnpm config set registry http://r.cnpmjs.org/
yarn config set registry http://r.cnpmjs.org/

Gem

提供方源及使用方式
Ruby China

https://ruby.taobao.org/

gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
清华大学

https://mirrors.tuna.tsinghua.edu.cn/rubygems/

gem sources --add https://mirrors.tuna.tsinghua.edu.cn/rubygems/ --remove https://rubygems.org/

Maven

提供方源及使用方式
阿里云

http://maven.aliyun.com/nexus/content/groups/public/

<?xml version="1.0" encoding="UTF-8"?><settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd"
    xmlns="http://maven.apache.org/SETTINGS/1.1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <mirrors>
    <mirror>
      <id>alimaven</id>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
  </mirrors>
  <profiles>
    <profile>
        <repositories>
          <repository>
            <id>central</id>
            <name>Maven Repository Switchboard</name>
            <layout>default</layout>
            <url>http://repo1.maven.org/maven2</url>
            <snapshots>
              <enabled>false</enabled>
            </snapshots>
          </repository>
        </repositories>
        <id>offical</id>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>offical</activeProfile>
  </activeProfiles></settings>

代理方式

包管理器代理方式使用方式
piphttp/https
https_proxy=http://ip:hort pip install
composerhttp/https
https_proxy=http://ip:hort composer install
npmhttp/https
npm config set proxy http://ip:portnpm config set https-proxy https://ip:port
yarn config set proxy http://ip:portyarn config set https-proxy https://ip:port
gemhttp/https
http_proxy=http://ip:host https_proxy=https://ip:host gem install
gohttp/https
http_proxy=http://ip:host https_proxy=https://ip:host go get
分享给朋友:

相关文章

配置 Grbl

配置 Grbl

Grbl has a system ‘$’-command to tweak the settings and trigger runtime commands. Connect to Grbl using the serial terminal of your choice (baud rate 9600 unless you changed that in config.h) as 8-N-1 (8-bits, no parity, and 1-stop bit.) Once connect...

lcr-t4 晶体管测试仪更新固件

lcr-t4 晶体管测试仪更新固件

固件和手册transistortester1.21k.zipavrdudeprog33.zip通过创建具有以下功能的.bat文件(并指定适当的COM端口),也可以轻松地直接从Windows中的命令行进行编程:REM Writing Flash + EEPROM + Fuses (L=F7, H=D9, E=FC) avrdude -c avrisp -p m328p...

rainmeter 插件小调版

rainmeter 插件小调版

超详细系统信息.zip...

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。