国内访问github经常超时,可以按照如下方式配置hosts,就可以解决~
首先,把你访问过慢的域名复制到这个网站查询对应的ip地址。https://www.ipaddress.com
得到对应的ip地址后,进入/etc/hosts添加如下内容即可(windows电脑hosts文件位置可以百度一下)
https://www.ipaddress.com/
140.82.113.4 github.com
199.232.69.194 github.global.ssl.fastly.net
185.199.108.133 raw.githubusercontent.com
185.199.109.133 raw.githubusercontent.com
185.199.110.133 raw.githubusercontent.com
185.199.111.133 raw.githubusercontent.com
fatal: unable to access ‘https://github.com/xxxx.git/’: Failed to connect to github.com port 443: Timed out解决办法
使用git clone xxxx.git 命令pull代码时,出现unable to access, port 443错误,把网址里的“https”改为git,重试