出现“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]
相关文章
|
14天前
|
开发工具 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‘
18 1
|
21天前
|
开发工具 git
出现“error: failed to push some refs to ‘https://github.com/****.git‘”,如何解决问题
出现“error: failed to push some refs to ‘https://github.com/****.git‘”,如何解决问题
|
2月前
|
存储 Web App开发 安全
如何处理错误消息 HTTP error 421 occurred SSL handshake with github.com
如何处理错误消息 HTTP error 421 occurred SSL handshake with github.com
|
12月前
|
存储 开发工具 git
使用 git push 上传超过100MB文件报错 remote: error: this exceeds GitHub‘s file size limit of 100.00 MB
Git 大文件存储(LFS)用 Git 中的文本指针替换音频示例、视频、数据集和图形等大文件,同时将文件内容存储在 GitHub.com 或 GitHub Enterprise 等远程服务器上。
242 0
|
2月前
【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:
|
9月前
|
缓存 Shell 网络安全
Github-推送代码报错“error:RPC failed;curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL,errno 10054”解决方案
Github-推送代码报错“error:RPC failed;curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL,errno 10054”解决方案
164 0
|
存储 Shell 开发工具
GitHub git push超过100MB大文件失败(write error: Broken pipe)完美解决
GitHub git push超过100MB大文件失败(write error: Broken pipe)完美解决
1235 0
GitHub git push超过100MB大文件失败(write error: Broken pipe)完美解决
|
开发工具 git
fatal: unable to access ‘https://github.com/.../.git‘: Could not resolve host: github.com解决方法【亲测有效】
1.问题原因 今天在使用Github的时候突然出现了这样的报错,云里雾里,看了网上的解决办法,说是代理服务器的问题,尝试了无数遍无果 然后Ping了一下github网站,发现Ping不通:
1377 0
|
开发工具 git
【经验分享】【Github】Error: Action failed with “The process ‘/usr/bin/git‘ failed with exit code 128“
【经验分享】【Github】Error: Action failed with “The process ‘/usr/bin/git‘ failed with exit code 128“
254 0
|
开发工具 git
完美解决 fatal: unable to access ‘https://github.com/.../.git‘: Could not resolve host: github.com
完美解决 fatal: unable to access ‘https://github.com/.../.git‘: Could not resolve host: github.com
15596 0