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

参考文件

相关推荐
Norvyn_7几秒前
LeetCode|Day18|20. 有效的括号|Python刷题笔记
笔记·python·leetcode
超奇电子15 分钟前
阿里云OSS预签名URL上传与临时凭证上传的技术对比分析
数据库·阿里云·云计算
chao_78918 分钟前
更灵活方便的初始化、清除方法——fixture【pytest】
服务器·自动化测试·python·pytest
心情好的小球藻1 小时前
Python应用进阶DAY9--类型注解Type Hinting
开发语言·python
都叫我大帅哥1 小时前
LangChain加载HTML内容全攻略:从入门到精通
python·langchain
惜.己1 小时前
使用python读取json数据,简单的处理成元组数组
开发语言·python·测试工具·json
都叫我大帅哥2 小时前
Python的Optional:让你的代码优雅处理“空值”危机
python
曾几何时`4 小时前
基于python和neo4j构建知识图谱医药问答系统
python·知识图谱·neo4j
写写闲篇儿7 小时前
Python+MongoDB高效开发组合
linux·python·mongodb
杭州杭州杭州8 小时前
Python笔记
开发语言·笔记·python