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 151.101.108.133, and there was some packet loss.

I checked the IP address on this website, then discovered that it was not valid:

IP Address : 151.101.108.133
Location   : United States (95% accuracy)
Host Name  : Unable to contact the host at IP Address 151.101.108.133

So the solution is appending the correct IP address 199.232.56.133 into the local Hosts file (/etc/hosts on UNIX).