利用代理设置解决GIT出现的TIMEOUT等错误

解决Git网络操作中出现的TIMEOUT等常见错误,详细介绍如何使用代理设置解决大陆用户遇到的Git网络问题。

问题描述

在大陆用户使用Git 的时候,会出现一个有意思的现象
只要是涉及到网络操作:pull,push,clone Git 网络总是会出现各种问题,包括:TIMEOUT 等常见错误

设置代理

环境支持:
linux或者windows (git bash)上都可以使用
使用clash for windows 作为代理工具设置,所以接口默认:7890
注意:clash 是有支持linux 系统
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy https://127.0.0.1:7890
git config --global http.sslVerify false
#取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy

检查代理设置

git config --global http.proxy #查看git的http代理配置
git config --global https.proxy #查看git的https代理配置
git config --global -l #查看git的所有配置
NextGen Digital... Welcome to WhatsApp chat
Howdy! How can we help you today?
Type here...