出现“Could not resolve host: www.github.com; Unknown error”错误解决

简介: 出现“Could not resolve host: www.github.com; Unknown error”错误解决

@TOC

一、报错提示

[root@node-1 ~]# curl www.github.com
curl: (6) Could not resolve host: www.github.com; Unknown error

二、测试外网百度域名访问

[root@node-1 ~]# ping www.baidu.com
ping: unknown host www.baidu.com

三、查看dns配置

[root@node-1 network-scripts]# cat ifcfg-eth0 
TYPE="Ethernet"
BOOTPROTO=none
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
NAME="eth0"
UUID="c3b26ff5-82d4-450a-8a3b-e19a19c1bd4c"
DEVICE="eth0"
ONBOOT="yes"
IPADDR=192.168.3.11
PREFIX=24
GATEWAY=192.168.3.254
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes

四、配置dns

[root@node-1 network-scripts]# nmcli con modify eth0 ipv4.dns 192.168.3.254 ipv4.method manual
[root@node-1 network-scripts]# nmcli con reload 
[root@node-1 network-scripts]# nmcli con up eth0 
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/1)

五、测试外网访问下载

[root@node-1 network-scripts]# ping www.baidu.com -c 4
PING www.a.shifen.com (112.80.248.76) 56(84) bytes of data.
64 bytes from 112.80.248.76: icmp_seq=1 ttl=55 time=22.1 ms
64 bytes from 112.80.248.76: icmp_seq=2 ttl=55 time=22.2 ms
64 bytes from 112.80.248.76: icmp_seq=3 ttl=55 time=22.0 ms
64 bytes from 112.80.248.76: icmp_seq=4 ttl=55 time=21.7 ms

--- www.a.shifen.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3002ms
rtt min/avg/max/mdev = 21.785/22.051/22.253/0.231 ms



[root@node-1 ~]# 
[root@node-1 ~]# wget https://dl.360safe.com/360zip_setup.exe
--2021-12-31 23:38:54--  https://dl.360safe.com/360zip_setup.exe
Resolving dl.360safe.com (dl.360safe.com)... 36.32.131.66, 36.32.131.67, 118.212.132.249, ...
Connecting to dl.360safe.com (dl.360safe.com)|36.32.131.66|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14771792 (14M) [application/octet-stream]
Saving to: ‘360zip_setup.exe’

100%[=============================================================================================>] 14,771,792  15.5MB/s   in 0.9s   

2021-12-31 23:38:55 (15.5 MB/s) - ‘360zip_setup.exe’ saved [14771792/14771792]
相关文章
|
1月前
|
网络安全 开发工具 git
解决fatal:remote error:You can’t push to git://github.com/username/*.g
通过上述诊断与修复步骤,绝大多数的推送错误都能得到有效解决,确保您的Git工作流顺畅无阻。
77 1
|
4月前
|
网络协议 Shell 网络安全
ssh: connect to host github.com port 22: Connection refused
本文讨论了在使用Git命令操作GitHub时遇到的"ssh: connect to host github.com port 22: Connection refused"错误,分析了可能的原因,并提供了使用443端口或https协议作为解决方案,最终确定问题是由于DNS解析错误导致,通过修改hosts文件解决。
ssh: connect to host github.com port 22: Connection refused
|
4月前
|
开发工具 git
GitHub——Error: Process completed with exit code 126.
GitHub——Error: Process completed with exit code 126.
72 1
GitHub——Error: Process completed with exit code 126.
|
4月前
|
存储 开发工具 数据安全/隐私保护
解决Gitee或者Github出现Access denied fatal: unable to access,The requested URL returned error: 403
解决Gitee或者Github出现Access denied fatal: unable to access,The requested URL returned error: 403
803 0
|
5月前
|
网络安全 开发工具 git
【git】解决git报错:ssh:connect to host github.com port 22: Connection timed out 亲测有效
【git】解决git报错:ssh:connect to host github.com port 22: Connection timed out 亲测有效
1353 1
|
6月前
|
开发工具 git
【已解决】error: failed to push some refs to ‘git@github.com:BATdalao/Github-green.git‘
【已解决】error: failed to push some refs to ‘git@github.com:BATdalao/Github-green.git‘
|
6月前
|
开发工具 git
出现“error: failed to push some refs to ‘https://github.com/****.git‘”,如何解决问题
出现“error: failed to push some refs to ‘https://github.com/****.git‘”,如何解决问题
750 1
|
存储 开发工具 git
使用 git push 上传超过100MB文件报错 remote: error: this exceeds GitHub‘s file size limit of 100.00 MB
Git 大文件存储(LFS)用 Git 中的文本指针替换音频示例、视频、数据集和图形等大文件,同时将文件内容存储在 GitHub.com 或 GitHub Enterprise 等远程服务器上。
588 0
|
7月前
【Error】fatal: unable to access ‘https://github.com/PanJiaChen/vue-element-admin/‘: OpenSSL SSL_read:
【Error】fatal: unable to access ‘https://github.com/PanJiaChen/vue-element-admin/‘: OpenSSL SSL_read:
|
开发工具 git
fatal: unable to access ‘https://github.com/.../.git‘: Could not resolve host: github.com解决方法【亲测有效】
1.问题原因 今天在使用Github的时候突然出现了这样的报错,云里雾里,看了网上的解决办法,说是代理服务器的问题,尝试了无数遍无果 然后Ping了一下github网站,发现Ping不通:
1855 0