git设置超时设置

这篇文章发表于 阅读 11

遇到大型时项目,git可能超时,可以通过设置超时时间解决

http.timeout

设置超时时间,单位为

git config --global http.timeout 30

http.postBuffer

除了设置超时时间外,还可以设置缓存区,大型项目去要更多的缓存区, 单位为byte

git config --global http.postBuffer 1048576000

单位为byte,1048576000就是1G

http.lowSpeedLimit

设置最低速度限制

git config --global http.lowSpeedLimit 0

http.lowSpeedTime

设置速度小于http.lowSpeedLimit后等待的时间,单位为

git config --global http.lowSpeedTime 600

如果速度小于http.lowSpeedLimit并且时间超过http.lowSpeedTime链接就会断开。