I'm trying to run brew update and get the following error:
brew update
fatal: unable to access 'https://github.com/Homebrew/homebrew.git/': Could not resolve host: github.com
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
It seems like something is messed up in my DNS resolution:
ping github.com
ping: cannot resolve github.com: Unknown host
ping google.com
ping: cannot resolve google.com: Unknown host
Though pinging google public DNS by IP works:
ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=59 time=14.748 ms
I'm able to access google and github via browser just fine. I think some of the configuration for my DNS was changed when I upgraded to the OS X El Capitan beta. I'm not familiar with how that works so any help is appreciated!
UPDATE: It looks like the issue was caused by using my VPN (privateinternetaccess). Any ideas on why that would break 'ping'?
Turns out it was an issue with Private Internet Access. They have a newer version that resolves the issue. Here are their directions in case someone else runs into the same problem:
There was a known conflict between our application and MacOS 10.11 (El Capitan), resulting in the client being unable to function correctly. We have recently released version 49 of the Mac OSX client to deal with this issue. Please remove the current installation of the PIA client software, and install v.49 from our website:
- Go into your Applications folder, and drag Private Internet Access.app to the Trashbin. Empty the Trashbin after doing this.
- Open Terminal
- NOTE Please make sure this step is completed very carefully. All symbols, and spacing are VERY important. Incorrect usage of this command can lead to Data loss. (It is best to simply copy and paste the command below) Type: rm -rf ~/.pia_manager/
- Press enter. If the command is successful, there will be no confirmation, it will simply go to a new line in the Terminal window.
Please make sure to complete step 3 very carefully.
Next, power off your computer, wait 60 seconds and turn it back on. After this, please download a fresh copy from our website (https://www.privateinternetaccess.com/pages/client-support/), and give the install another try.