git安装
sudo yum install -y git
进入hosts文件
sudo gedit /etc/hosts
如果显示文件只读,修改读写权限
chmod a+w -R /etc/hosts
在hosts文件内添加以下三条语句
140.82.112.4 github.com
199.232.69.194 github.global.ssl.fastly.net
140.82.112.10 codeload.github.com
IP经常会更新,需要去以下地址查询每行的英文部分后进行更新,如果在以后从GitHub上下载时出现卡顿,也可通过IP更新提速
https://github.com.ipaddress.com/
文档保存后进行刷新
/etc/init.d/network restart