Timeout with brew update

Posted on

QUESTION :

This is driving me crazy. I can’t update my homebrew installation anymore. When I run brew update, it just does nothing and times out.

I even tried reinstalling it, but then I run into the same problem when I use the default installer. I ended up using the “Untar anywhere” (https://github.com/mxcl/homebrew/wiki/Installation) option, which worked great. But I still can’t update homebrew.

→ brew update
Initialized empty Git repository in /usr/local/homebrew/.git/
error: Failed connect to github.com:3128; Operation timed out while accessing https://github.com/mxcl/homebrew.git/info/refs?service=git-upload-pack
fatal: HTTP request failed
Error: Failure while executing: git fetch origin

Running in verbose mode doesn’t help a lot:

→ brew update -v
git init 
Initialized empty Git repository in /usr/local/homebrew/.git/
git config core.autocrlf false 
git remote add origin https://github.com/mxcl/homebrew.git 
git fetch origin 
error: Failed connect to github.com:3128; Operation timed out while accessing https://github.com/mxcl/homebrew.git/info/refs?service=git-upload-pack
fatal: HTTP request failed
Error: Failure while executing: git fetch origin

Here’s the brew --config output:

→ brew --config 
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew
HEAD: (none)
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/homebrew/Cellar
CPU: quad-core 64-bit ivybridge
OS X: 10.8.4-x86_64
Xcode: 4.6.3
CLT: 4.6.0.0.1.1365549073
LLVM-GCC: build 2336
Clang: 4.2 build 425
X11: N/A
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

ANSWER :

Turned out I set a proxy for git a long time ago when I was working behind a firewall. To remove the proxy from git, I simply ran:

→ git config --global http.proxy ''

And everything works fine again!

Leave a Reply

Your email address will not be published.