阿里云源 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 等等。。。

参考文件

相关推荐
羡林i6 分钟前
ProcessPoolExecutor 传参踩坑实测:pickle 失败的四种写法
python
Dmz丶12 分钟前
前端转 AI 100 天 Day 30:正式上线——从零部署一个完整服务(含 30 天复盘)
python
稻草人47829 分钟前
安装OCA模块
python
用户50656592777632 分钟前
回测引擎的五个工程细节:3000 根 4 小时 K 线跑出来的成本差
python
黑妹天下第一乖1 小时前
255 次尝试就能恢复 CA 私钥?这次 TLS 信任链事故,值得每个 AI 开发者警惕
人工智能·python·https·tls·信任链·ca
happylifetree1 小时前
Python68:核心语法-函数进阶-匿名函数(lambda表达式)
python
专注仿真1 小时前
从「能跑通」到「能交付」:一套可直接落地的电商用户行为分析平台(Python + SQLite/MySQL + Streamlit 全栈源码与部署文档)
python·mysql·sqlite
小小张说故事1 小时前
Python 的 for 到底怎么跑起来的?拆开迭代协议:GET_ITER 之后 FOR_ITER 在循环什么
python
凯瑟琳.奥古斯特2 小时前
动态调优IoU提升OCR文本合并精度
开发语言·python·算法
蒸鱼Yuzheng2 小时前
自动化长任务治理:租约、心跳、孤儿进程与安全回收
自动化测试·python·任务调度·可靠性·分布式系统