报错原因是github.com没有被主机给解析,
0: ping github.com
PING github.com (192.30.255.112): 56 data bytes
64 bytes from 192.30.255.112: icmp_seq=0 ttl=43 time=144.449 ms
64 bytes from 192.30.255.112: icmp_seq=1 ttl=43 time=140.965 ms
1:先 ping 看一下主机地址
ping localhost
2:编辑文件etc/hosts
vi /etc/hosts
i 启动编辑模式
::1 localhost
192.30.255.112 github.com
3:添加github的地址
esc 退出编辑模式
:wq退出vi
4:成功解决问题