云服务器无法将仓库代码上传到GitHub上

上传代码到GitHub失败

异常提示为无法访问仓库

测试 ping github.com

存在丢包情况

修改hosts

通过https://www.ipaddress.com/查询github.com和raw.githubusercontent.com的DNS解析的IP地址

140.82.113.4 github.com
185.199.108.133 raw.githubusercontent.com

将上述两行追加到服务器/etc/hosts文件中

重新测试正常 未丢包

重新上传代码