DNS issue: unable to connect to raw.githubusercontent.com?

All requests related to raw.githubusercontent.com seem to fail.

Using 0.116.2, as virtual appliance (using Virtualbox).
Seeing an issue in HACS (as it pulls from raw.githubusercontent.com)
Did not have issues in the past, have installed multiple integrations.

In log:

2020-10-14 14:04:46 INFO (MainThread) [backoff] Backing off async_download_file(...) for 0.4s (aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host raw.githubusercontent.com:443 ssl:default [Try again])

In console:

$ wget https://raw.githubusercontent.com/thomasloven/lovelace-auto-entities/master/auto-entities.js
wget: bad address 'raw.githubusercontent.com'

DNS seems fine:

dig raw.githubusercontent.com
...
raw.githubusercontent.com. 10	IN	CNAME	github.map.fastly.net.
github.map.fastly.net.	10	IN	A	151.101.0.133...

ping fails (works okay on other systems, and works okay for the CNAME address)

$ ping -c 1 raw.githubusercontent.com
ping: bad address 'raw.githubusercontent.com'
$ ping -c 1 github.map.fastly.net
PING github.map.fastly.net (151.101.0.133): 56 data bytes
64 bytes from 151.101.0.133: seq=0 ttl=58 time=4.182 ms

Command line works fine after adding to /etc/hosts (which I prefer not to…):

151.101.0.133   raw.githubusercontent.com

But issue remains when trying to access through HACS.

1 Like

resolved after switching DNS server to/from Cloudflare/Google. Still not sure why, but it fixes it.

ha dns options --servers dns://1.1.1.1
ha dns restart
curl -I raw.githubusercontent.com
6 Likes

Thank you! i had been trying to fix this for hours :smiley:

Thanks a ton!

Late to the party but just to say THANK YOU so much! Been struggling all morning with this.