github.com连接超时
1.错误信息
之前github都能用,但是今天git clone的时候居然连不上了,报错信息如下:
$ git clone git@github.com:hanchao5272/myreflect.git
Cloning into 'myreflect'...
ssh_dispatch_run_fatal: Connection to 13.250.177.223 port 22: Software caused connection abort
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
2.错误分析
于是怀疑是连接不到github.com了,首先在cmd窗口中,尝试ping一下百度
C:\Users\hanchao>ping www.baidu.com
正在 Ping www.a.shifen.com [61.135.169.121] 具有 32 字节的数据:
来自 61.135.169.121 的回复: 字节=32 时间=24ms TTL=57
来自 61.135.169.121 的回复: 字节=32 时间=45ms TTL=57
来自 61.135.169.121 的回复: 字节=32 时间=26ms TTL=57
来自 61.135.169.121 的回复: 字节=32 时间=22ms TTL=57
61.135.169.121 的 Ping 统计信息:
数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 22ms,最长 = 45ms,平均 = 29ms
说明网络连接正常。
然后再ping一下github.com
C:\Users\hanchao>ping github.com
正在 Ping github.com [13.229.188.59] 具有 32 字节的数据:
请求超时。
请求超时。
请求超时。
请求超时。
13.229.188.59 的 Ping 统计信息:
数据包: 已发送 = 4,已接收 = 0,丢失 = 4 (100% 丢失),
确实ping不通。
因此怀疑是:本地DNS无法解析导致的。
3.错误解决
打开C:\Windows\System32\drivers\etc\hosts,内容如下:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
0.0.0.0 account.jetbrains.com
发现:确实没有github.com的解析
在文件末尾添加如下内容,并保存:
192.30.255.112 github.com git
185.31.16.184 github.global.ssl.fastly.net
重启cmd窗口,继续ping一下github.com:
正在 Ping github.com [192.30.255.112] 具有 32 字节的数据:
来自 192.30.255.112 的回复: 字节=32 时间=311ms TTL=48
来自 192.30.255.112 的回复: 字节=32 时间=365ms TTL=48
来自 192.30.255.112 的回复: 字节=32 时间=376ms TTL=48
来自 192.30.255.112 的回复: 字节=32 时间=353ms TTL=48
192.30.255.112 的 Ping 统计信息:
数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 311ms,最长 = 376ms,平均 = 351ms
- 说明,本机已经能够正常解析
github.com这个域名了。至此,问题解决
github.com连接超时的更多相关文章
- Ruby http/net 中连接超时问题
下面在调用币安的接口时,经常会卡住,设置连接超时也不会抛出异常,代码如下(默认连接超时为nil, 参考:https://github.com/ruby/ruby/pull/269): require ...
- golang中mysql建立连接超时时间timeout 测试
本文测试连接mysql的超时时间. 这里的"连接"是建立连接的意思. 连接mysql的超时时间是通过参数timeout设置的. 1.建立连接超时测试 下面例子中,设置连接超时时间为 ...
- 关于MySQL的wait_timeout连接超时问题报错解决方案
bug回顾 : 想必大家在用MySQL时都会遇到连接超时的问题,如下图所示: ### Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsExce ...
- Linux Vsftpd 连接超时解决方法(被动模式)
http://blog.csdn.net/qq_15766181/article/details/46554643 使用 FileZilla FTP Client 连接 Vsftpd FTP,在没有配 ...
- 修改tnsnames.ora文件中配置内容中的连接别名后,连接超时解决办法
1.tnsnames.ora文件中配置内容中的连接别名:由upaydb修改为IP地址 2.连接超时 定位原因: PLSQL登录界面的数据库列表就是读的tnsname.ora中连接的别名,这个文件中连接 ...
- SQL Server 连接超时案例一则
上周六,一工厂系统管理员反馈一数据库连接不上,SSMS连接数据库报"连接超时时间已到.在尝试使用预登录握手确认时超过了此超时时间.......", 如下截图所示: 另外远程连接也连 ...
- SSRS报表连接超时的问题
这段时间遇到一个问题就是ReportService 中采用了远程连接的报表偶尔会断开连接,导致报表导出异常,查阅了很多资料,几天来就是断断续续的终于解决了这个问题,下面把一些解决的点一一展示出来,便于 ...
- Linux Vsftpd 连接超时解决方法
Linux Vsftpd 连接超时解决方法 2013-11-13 10:58:34| 分类: 默认分类|举报|字号 订阅 解决方法(http://www.lingdus.com/thread ...
- (转)hbase master挂掉-zookeeper连接超时原因
link:http://www.51testing.com/?uid-445759-action-viewspace-itemid-812467 并行运行hbase删表,建表操作,多个表多个regio ...
随机推荐
- SpringCloud服务Gradle本地jar配置
1. 将jar包移到与src平级的目录内,并在build.gradle文件中配置如下: dependencies{ compile fileTree(dir:'libs/',include:" ...
- C仿黑白棋版XO棋
两位玩家轮流在棋盘上放置不同颜色的棋子,一位玩家使用黑子,另一位使用白子,棋盘是一个偶数正方形. 只能将一个棋子放在对手的棋子旁边,使对手在水平.垂直.对角线方向上的棋子变成自己的棋子,游戏结束时,棋 ...
- html5中的fieldset/legend元素和keygen元素
html5中的fieldset/legend元素和keygen元素 一.总结 一句话总结: fieldset/legend元素和figure和figcaption很像,只不过是作用于表单,前者表示内容 ...
- !!a标签和button按钮只允许点击一次,防止重复提交
button 方法:加上属性disabled = “disabled” 或者 disabled = “true” <button id="btn" disabled=&quo ...
- 经管/管理/团队经典电子书pdf下载
卓有有效的管理者 管理的本质 只有偏执狂才能生存 格鲁夫给经理人的第一课 影响力: 你为什么会说“是” 关键影响力:如何调动团队力量 执行 如何完成任务的学问
- C#随机挑选某一个用户或者几个用户信息
&& u.EnabledMark == ).OrderBy(_=>Guid.NewGuid()).Take(); && u.EnabledMark == ).Or ...
- 解决Wireshark安装Npcap组件失败
解决Wireshark安装Npcap组件失败 从Wireshark 3.0开始,Npcap取代Winpcap组件,成为Wireshark默认的网卡核心驱动.由于该组件属于驱动程序,所以安装时候容易 ...
- Python之Pandas操作csv文件dataframe
# -*- coding: utf-8 -*- # author:baoshan import pandas as pd def main(): aqi_data = pd.read_csv('chi ...
- UniPush使用指南
原贴:https://ask.dcloud.net.cn/article/35622 UniPush使用指南 分类:uni-app Push unipush 从HBuilderX 1.7.2起,uni ...
- window TOMCAT 端口被占用了怎么办?
查看80端口被哪些程序占用了 netstat -ano|findstr "80" 根据pid(进程id) 查询对应的应用程序 tasklist|findstr "1828 ...