Tag Archives: curl fail

How to solve problems like curl: (7) failed to connect to raw.githubusercontent.com Port 443: problem with connection used

Background of

the following error was reported when installing my-zsh

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

I recently noticed that github users’ profile pictures and images from my posts no longer show up. Then today I found an error message for the title when homeBrew and NVM were installed.

these are installed PNPM error message, can be found that the script needs to pull the code on raw.githubusercontent.com.

Internet search, found that some github domain name DNS resolution is contaminated, causing DNS resolution process can not get the correct IP address through the domain name.

DNS pollution

DNS pollution, interested friends can go to understand.

solution

open https://www.ipaddress.com/ input can’t access the domain name

query can get the correct IP address

is added in the host file of the machine. It is recommended to use switchhosts to facilitate host management of

199.232.68.133 raw.githubusercontent.com 199.232.68.133 user-images.githubusercontent.com
199.232.68.133 avatars2.githubusercontent.com
199.232.68.133 avatars1.githubusercontent.com

add the above several host configuration, the page picture display will be normal, homebrew can also be installed, NVM action is flexible.

Reference

https://github.com/hawtim/blog/issues/10