fatal: unable to access 'https://github.com/.../.git': Could not resolve host: github.com解决方法

  • 1.问题原因
  • 2.解决办法

1.问题原因

今天在使用Github的时候突然出现了这样的报错,云里雾里,看了网上的解决办法,说是代理服务器的问题,尝试了无数遍无果

然后Ping了一下github网站,发现Ping不通:

ping github.com

这里考虑应该是hosts文件解析的问题☘️


2.解决办法

在hosts文件中加入如下三行:

140.82.112.3 github.com
199.232.5.194 github.global.ssl.fastly.net
54.231.114.219 github-cloud.s3.amazonaws.com

140.82.112.3 是github网站服务器的真实IP地址,如果你想获得最新的,可以从这里获取:

Github IP address

再次Ping github.com,可以Ping通啦!✌

> ping github.com正在 Ping github.com [140.82.112.3] 具有 32 字节的数据:
来自 140.82.112.3 的回复: 字节=32 时间=308ms TTL=42
来自 140.82.112.3 的回复: 字节=32 时间=292ms TTL=42
来自 140.82.112.3 的回复: 字节=32 时间=298ms TTL=42
来自 140.82.112.3 的回复: 字节=32 时间=300ms TTL=42140.82.112.3 的 Ping 统计信息:数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):最短 = 292ms,最长 = 308ms,平均 = 299ms

此时再次进行pullpush操作,发现成功了!问题解决

fatal: unable to access ‘https://github.com/.../.git‘: Could not resolve host: github.com解决方法【亲测有效】相关推荐

  1. Git-fatal: unable to access ‘https://gitlab.XX.git/‘: Could not resolve host: gitlab.XX.com.cn

    克隆,提交代码 时报错如下: fatal: unable to access 'https://gitlab.XX.git/': Could not resolve host: gitlab.XX.c ...

  2. hexo提交报错 unable to access ‘https://github.com/*/*.github.io.git/‘: Couldn‘t resolve host ‘github.com

    title: >- hexo提交报错 unable to access 'https://github.com//.github.io.git/': Couldn't resolve host ...

  3. Git ----fatal: unable to access ‘https://gitee.com/***.git/‘: SSL certificate problem: unable

    fatal: unable to access 'https://gitee.com/gzllkm/GZL.git/': SSL certificate problem: unable to get ...

  4. fatal: unable to access ‘https://gitee.com/****/****.git/‘: The requested URL returned error

    mac 拉取服务器代码到本地时报错 git clone 的时候报错,百度很久没有找到答案,权限已经配置好的了,这个是前提哦. 后来才发现是clone的地址搞错了,gitee 默认的地址是HTTPS的, ...

  5. fatal: unable to access ‘https://github.com/***.git/‘: OpenSSL SSL_read: Connection was reset, errno

    写了点code,想交到GitHub,结果报了个错. fatal: unable to access 'https://github.com/koking0/Algorithm.git/': OpenS ...

  6. git的clone命令出现fatal:unable to access ‘https://github.comXXXXXXX“:OpenSSL SSL_read:connection was errn

    git使用git clone命令时出现错误fatal:unable to access 'https://github.comXXXXXXX":OpenSSL SSL_read:connec ...

  7. 【git clone 报错】fatal: unable to access ‘https://github.com/zimeng303/React.git/‘: Failed to connect

    [git clone 报错]fatal: unable to access 'https://github.com/zimeng303/React.git/': Failed to connect t ...

  8. git clone 出现fatal: unable to access ‘https://github 类错误解决方法

    git clone 遇到问题:fatal: unable to access 'https://github.comxxxxxxxxxxx': Failed to connect to xxxxxxx ...

  9. Git报错解决:fatal: unable to access ‘https://github.com/...‘: OpenSSL SSL_read:..., errno 10054

    Git报错解决:fatal: unable to access 'https://github.com/-': OpenSSL SSL_read: Connection was reset, errn ...

最新文章

  1. 【Live555】live555源码详解(九):ServerMediaSession、ServerMediaSubsession、live555MediaServer
  2. 20151102adonet2
  3. 用java调用oracle存储过程总结二
  4. 实训说明书 在线音乐平台项目规格说明书
  5. 虚拟化服务器的管理与维,服务器虚拟化管理
  6. 基于神经网络的文本分类(基于Pytorch实现)
  7. 一个数据库管理员的自我救赎之路
  8. wxPython + PyOpenGL 打造三维数据分析的利器!| CSDN 博文精选
  9. 如何估算网站日承受最大访问PV
  10. virtuoso根据原理图绘制版图并联接_Cadence教程2——反相器原理图仿真以及版图绘制...
  11. 【浙江省第16届省赛J:】Welcome Party(并查集+优先队列bfs遍历)
  12. java插件化编程(动态加载)
  13. 小米bl未解锁变砖了如何刷机_如何正确刷机
  14. openwrt系统安装到云服务器,云服务器安装openwrt
  15. 什么是UI设计,深入了解UI
  16. 香港电影金像奖23年全面回顾
  17. STP文件服务器,STP
  18. Centos 7 DHCP中继
  19. 中南大学计算机2020研究生分数线,2020中南大学考研分数线已公布
  20. 【安全牛学习笔记】w3af-身份认证

热门文章

  1. JAVA电子病历系统源码,云端SaaS服务 前后端分离模式开发和部署
  2. APP设备数据的特征衍生与模型应用
  3. Joplin笔记 android,把笔记还给用户「Joplin」可以选择自己存储位置的笔记应用
  4. pb8连接mysql_pb连接mySql数据库
  5. 傅里叶分析 —— 趣之讲解
  6. 《C++复习---模板初阶》
  7. 【SemiDrive源码分析】【X9芯片启动流程】27 - AP1 Android Preloader启动流程分析(加载atf、tos、bootloader镜像后进入BL31环境)
  8. C语言基本概念----类型
  9. c++中数字与string转换
  10. 腾讯云函数部署网易云音乐刷歌和bilibili签到打卡投币