1. Solve the problem that git push/git clone code is too slow:
1. Open the hosts file with administrator privileges
sudo vim /etc/hosts
2. Fill in a blank line at the end of the file
151.101.72.249 github.global.ssl.fastly.net
After the modification, the speed increased from about 10k20k to about 500k-1000k
2. Check out a large project and report an error. The default value of curl's postBuffer is too small:
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
If the project is complex and large, this error will occur when checking out, because the default value of curl's postBuffer is too small. You can reconfigure this value in the terminal:
git config --global http.postBuffer 524288000 (这个值是kb 500M,根据具体项目大小修改)
Then check if the configuration is successful:
git config --list
Author: Wo _____
link: https: //www.jianshu.com/p/9a32d16e15bf