解决Git ‘unable to resolve host address ‘github.com‘、 ‘raw.githubusercontent.com‘

1. Log in https://www.ipaddress.comto check the latest address.
2. /etc/hostsAdd to

For example, what I currently find is

185.199.110.133 raw.githubusercontent.com
140.82.112.4 github.com

insert image description here
Re-opening git works just fine.


Note that the following ip that is often found on the Internet has expired

192.30.253.112  github.com

Supplement: For Windows systems, the above may not work yet. You need to download C:\Windows\System32\drivers\etcthe hosts file and make the above changes to solve it. 【I am in this situation】

Guess you like

Origin blog.csdn.net/Dust_Evc/article/details/127586014