-

Here's how to access GitHub despite a DNS outage. This tutorial is for Mac, but the general idea applies to other operating systems, too.

First, Get the A records for github.com, avatars3.githubusercontent.com, assets-cdn.github.com. You can do this with a command like:

host github.com 8.8.8.8


Next, open your hosts file with the following command:

sudo nano /etc/hosts


You don't have to use nano. I'm just using it for this walkthrough. Now add the following lines, with tabs in between each IP and the domain name:

192.30.253.112    github.com
151.101.48.133    avatars3.githubusercontent.com
151.101.48.133    assets-cdn.github.com


Save with Ctrl+O, and exit with Ctrl+X.