Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question

1 Answer 1

up vote 3 down vote accepted

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!

share|improve this answer
1  
Amazing! Thank you. You should accept your own answer. –  Stéphane Bruckert Apr 23 at 15:38
    
Oh, interesting. Didn't know that was possible! Thanks! –  afpel Apr 24 at 8:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.