使用git在拉取仓库时速度很慢或者经常超时
报错Failed to connect to github.com port 443 after 21085 ms: Timed out
在本地开代理后, git bash 需要进行相应的设置才能使用,简单记录一下:
1. 取消git bash代理
git config --global --unset http.proxy
git config --global --unset https.proxy
2. 更新DNS缓存
ipconfig /flushdns
3. 设置git bash代理
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
或者
git config --global http.proxy 'socks5://127.0.0.1:10808'
git config --global https.proxy 'socks5://127.0.0.1:10808
根据自己情况自行设置。
设置完成后,git bash 也可以借助科学上网进行加速了。
本文介绍了如何处理Git在拉取GitHub仓库时出现的速度慢或超时问题,包括取消代理、更新DNS缓存以及设置HTTP/HTTPS代理的步骤,帮助用户通过代理加速Git操作。
1146

被折叠的 条评论
为什么被折叠?



