设置GIT代理

前言

很多同学在使用Git拉取代码被网络限制,速度很慢,本文给大家介绍如何给Git设置代理访问。

注意:

以下示例代码的端口要根据自己实际代理端口。

设置全局代理

git config --global http.proxy socks5://127.0.0.1:1089

取消全局代理

git config --global --unset http.proxy

设置当前代理

git config http.proxy http://127.0.0.1:1089

取消当前代理

git config --unset http.proxy

全局针对性设置代理,只对github.com

git config --global http.https://github.com.proxy socks5://127.0.0.1:1089

取消全局针对性代理

git config --global --unset http.https://github.com.proxy
posted @   烨熠  阅读(82)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
点击右上角即可分享
微信分享提示