由于某种原因,我无法以任何方式在我的Ubuntu 18.04计算机上加载Github。我尝试了Crome和Firefox。我尝试使用-取消设置代理
git config --global --unset http.proxy
git config --global --unset https.proxy
我也尝试将其设置为空白
git config --global http.proxy ""
git config --global https.proxy ""
我想清除缓存,手动删除并在主文件夹中重新创建.gitconf文件。但是似乎没有任何作用。git clone请求也不会从命令行执行。该站点仅声明连接已超时。
我终于尝试使用wireshark捕获连接信息。当我输入github.com中的任何URL时,它什么也没有给出。几分钟后,当我收到超时错误时,我从wireshark收到了此消息-
No. Time Source Destination Protocol Length Info
205 115.210340122 192.168.29.136 35.224.99.156 TCP 74 54616 → 80 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM=1 TSval=1144885874 TSecr=0 WS=128
Frame 205: 74 bytes on wire (592 bits), 74 bytes captured (592 bits) on interface 0
Ethernet II, Src: D-LinkIn_ac:e5:4a (78:32:1b:ac:e5:4a), Dst: 14:ae:85:e1:09:98 (14:ae:85:e1:09:98)
Internet Protocol Version 4, Src: 192.168.29.136, Dst: 35.224.99.156
Transmission Control Protocol, Src Port: 54616, Dst Port: 80, Seq: 0, Len: 0
No. Time Source Destination Protocol Length Info
214 116.211223359 192.168.29.136 35.224.99.156 TCP 74 [TCP Retransmission] 54616 → 80 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM=1 TSval=1144886875 TSecr=0 WS=128
Frame 214: 74 bytes on wire (592 bits), 74 bytes captured (592 bits) on interface 0
Ethernet II, Src: D-LinkIn_ac:e5:4a (78:32:1b:ac:e5:4a), Dst: 14:ae:85:e1:09:98 (14:ae:85:e1:09:98)
Internet Protocol Version 4, Src: 192.168.29.136, Dst: 35.224.99.156
Transmission Control Protocol, Src Port: 54616, Dst Port: 80, Seq: 0, Len: 0
No. Time Source Destination Protocol Length Info
215 118.227149032 192.168.29.136 35.224.99.156 TCP 74 [TCP Retransmission] 54616 → 80 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM=1 TSval=1144888891 TSecr=0 WS=128
Frame 215: 74 bytes on wire (592 bits), 74 bytes captured (592 bits) on interface 0
Ethernet II, Src: D-LinkIn_ac:e5:4a (78:32:1b:ac:e5:4a), Dst: 14:ae:85:e1:09:98 (14:ae:85:e1:09:98)
Internet Protocol Version 4, Src: 192.168.29.136, Dst: 35.224.99.156
Transmission Control Protocol, Src Port: 54616, Dst Port: 80, Seq: 0, Len: 0
No. Time Source Destination Protocol Length Info
220 122.387150649 192.168.29.136 35.224.99.156 TCP 74 [TCP Retransmission] 54616 → 80 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM=1 TSval=1144893051 TSecr=0 WS=128
Frame 220: 74 bytes on wire (592 bits), 74 bytes captured (592 bits) on interface 0
Ethernet II, Src: D-LinkIn_ac:e5:4a (78:32:1b:ac:e5:4a), Dst: 14:ae:85:e1:09:98 (14:ae:85:e1:09:98)
Internet Protocol Version 4, Src: 192.168.29.136, Dst: 35.224.99.156
Transmission Control Protocol, Src Port: 54616, Dst Port: 80, Seq: 0, Len: 0
No. Time Source Destination Protocol Length Info
227 130.706783205 192.168.29.136 35.224.99.156 TCP 74 [TCP Retransmission] 54616 → 80 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM=1 TSval=1144901243 TSecr=0 WS=128
Frame 227: 74 bytes on wire (592 bits), 74 bytes captured (592 bits) on interface 0
Ethernet II, Src: D-LinkIn_ac:e5:4a (78:32:1b:ac:e5:4a), Dst: 14:ae:85:e1:09:98 (14:ae:85:e1:09:98)
Internet Protocol Version 4, Src: 192.168.29.136, Dst: 35.224.99.156
Transmission Control Protocol, Src Port: 54616, Dst Port: 80, Seq: 0, Len: 0
请帮忙。
不确定如何尝试使用ssh。
只需尝试
ssh -Tv git@github.com
git ls-remote git@github.com:<me>/<myRepo>
如果它不起作用,则可能意味着你无法联系github.com。
检查你的环境变量中是否有与代理相关的内容
env|grep -i proxy
该行
env|grep -i proxy
不返回任何内容该行-ssh -Tv git@github
返回-```OpenSSH_7.6p1 Ubuntu-4ubuntu0.3,OpenSSL 1.0.2n 2017年12月7日debug1:读取配置数据/ etc / ssh / ssh_config debug1:/ etc / ssh / ssh_config行19:为* ssh应用选项:无法解析主机名github:名称或服务未知```git ls remore行返回-ssh:连接到主机github.com端口22:连接超时@RuddradevRoychoudhury对不起,我是说
ssh -Tv git@github.com
连接仍然超时-
debug1: connect to address 192.30.253.112 port 22: Connection timed out
@RuddradevRoychoudhury github.com IP是140.82.121.4,所以您可能有某种网络/ DNS问题。您可以ping github.com吗?
Ping也超时。但是它可以在同一网络上的其他Ubuntu计算机上运行。我可以检查引起网络问题的原因吗?