Reputation: 1122
I ran brew update
and got
fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': Failed to connect to 10.8.0.1 port 8080: Operation timed out
Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!
So I sometimes use a network which has proxy, so I added the following lines to .bash_profile (apart from usual changes in network settings via system preferences):
export http_proxy="http://10.8.0.1:8080"
export https_proxy="https://10.8.0.1:8080"
So I thought this might be causing the problem and commented these lines out, used source .bash_profile, rebooted and used cellular network. Still the same error.
Upvotes: 31
Views: 46733
Reputation: 1
The same issue happened to me. I just had to run brew repair
, a command suggested in the error message. It fixed the problem while still using a VPN.
Upvotes: 0
Reputation: 1349
First remove the proxy, if you are using any proxy. I had the same problem.
In your terminal try running brew update-reset
and then source ~/.bash_profile
Upvotes: 62
Reputation: 3878
Reverting changes to ~/.gitconfig
worked for me.
From this answer: https://stackoverflow.com/a/64409020/1762493
The solution provided by OP is certainly a valid workaround, but for more context, the full piece of Git configuration that caused this behavior likely looked something like this:
[url "[email protected]:"]
insteadOf = https://github.com/
☝️ This is the part I commented out for brew update
to work again.
Upvotes: 3