Resolving "Failed to open TCP connection to gist.githubusercontent.com:443"
I met an error report when I used
jekyll-gist on my local machine:
Errno::ECONNREFUSED: Failed to open TCP connection to gist.githubusercontent.com:443 (Connection refused - connect(2) for "gist.githubusercontent.com" port 443)
According to the calling stack, I discovered that it’s due to the timeout during connecting to
gist.githubusercontent.com. So I tried to
ping it, then discovered that this hostname was parsed to
22.214.171.124, and there was some packet loss.
I checked the IP address on this website, then discovered that it was not valid:
IP Address : 126.96.36.199 Location : United States (95% accuracy) Host Name : Unable to contact the host at IP Address 188.8.131.52
So the solution is appending the correct IP address
184.108.40.206 into the local Hosts file (
/etc/hosts on UNIX).