阿里云源 Python、npm、git、goproxy

阿里云源 Python、npm、git、goproxy

各种设置源的方式也都比较常见,但是根本记不住,每次都查感觉也不太好。

正好发现了个宝藏地址,看起来还挺全的,以后找源也可以先在这个地方翻翻,顺便就搞了几个放到一个脚本里边。

脚本内容

bash 复制代码
#### python start ####
#### https://developer.aliyun.com/mirror/pypi?spm=a2c6h.13651102.0.0.28df1b11Iu49KV

mkdir -p ~/.pip

PYTHON_PIP=~/.pip/pip.conf

# echo "[global]" > $PYTHON_PIP
# echo "index-url = http://mirrors.aliyun.com/pypi/simple/" >> $PYTHON_PIP
# echo "" >> $PYTHON_PIP
# echo "[install]" >> $PYTHON_PIP
# echo "trusted-host=mirrors.aliyun.com" >> $PYTHON_PIP

echo "[global]
index-url = http://mirrors.aliyun.com/pypi/simple/

[install]
trusted-host=mirrors.aliyun.com
" > $PYTHON_PIP

#### python end ####

#### golang start ####
#### https://developer.aliyun.com/mirror/goproxy?spm=a2c6h.13651102.0.0.595d1b11ObQLXj

export GOPROXY=https://mirrors.aliyun.com/goproxy/

#### golang end ####


#### npm start ####
#### https://developer.aliyun.com/mirror/NPM?spm=a2c6h.13651102.0.0.595d1b11ObQLXj

npm config set registry https://registry.npmmirror.com

#### npm end ####

使用

把以上的内容贴到各种终端环境文件中,例如 bashrc/bash_profile 等等。。。

参考文件

相关推荐
数据智能老司机几秒前
精通 Python 设计模式——SOLID 原则
python·设计模式·架构
c8i1 小时前
django中的FBV 和 CBV
python·django
c8i1 小时前
python中的闭包和装饰器
python
这里有鱼汤5 小时前
小白必看:QMT里的miniQMT入门教程
后端·python
TF男孩15 小时前
ARQ:一款低成本的消息队列,实现每秒万级吞吐
后端·python·消息队列
该用户已不存在20 小时前
Mojo vs Python vs Rust: 2025年搞AI,该学哪个?
后端·python·rust
站大爷IP1 天前
Java调用Python的5种实用方案:从简单到进阶的全场景解析
python
用户8356290780511 天前
从手动编辑到代码生成:Python 助你高效创建 Word 文档
后端·python
c8i1 天前
python中类的基本结构、特殊属性于MRO理解
python
liwulin05061 天前
【ESP32-CAM】HELLO WORLD
python