git yarn npm 代理设置http socks5

git代理设置方法解决

npm 访问github失败 可以使用下列方法设置代理

git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080

git delete proxy

git config --global --unset http.proxy
git config --global --unset https.proxy

socks5 代理方式

git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
# 如果提示失败
git clone https://github.com/xxxxxx 
git clone https://ghproxy.com/https://github.com/xxxxxx 

也可以在浏览器中打开
https://ghproxy.com/https://github.com/xxxxxx.zip

yarn config set proxy http://127.0.0.1:1080
yarn config set https-proxy http://127.0.0.1:1080

npm

npm config set proxy=http://127.0.0.1:1080
# 查看源
npm get registry
# 设置源
npm config set registry https://registry.npmmirror.com
# 设置npmjs源 发布npm包时候必须使用npmjs源
npm config set registry https://registry.npmjs.org
posted @   刺头  阅读(1470)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
点击右上角即可分享
微信分享提示