brew 更新超时

afp*_*pel 5 git github homebrew macos

这真让我抓狂。我无法再更新我的自制软件安装。当我运行时brew update,它什么也不做并且超时。

我什至尝试重新安装它,但是当我使用默认安装程序时遇到了同样的问题。我最终使用了“随处解压”(https://github.com/mxcl/homebrew/wiki/Installation)选项,效果很好。但我仍然无法更新自制软件。

? 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
Run Code Online (Sandbox Code Playgroud)

在详细模式下运行并没有多大帮助:

? 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
Run Code Online (Sandbox Code Playgroud)

这是brew --config输出:

? 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
Run Code Online (Sandbox Code Playgroud)

afp*_*pel 7

原来我很久以前在防火墙后面工作时为 git 设置了一个代理。要从 git 中删除代理,我只需运行:

? git config --global http.proxy ''
Run Code Online (Sandbox Code Playgroud)

一切正常!


归档时间:

查看次数:

4568 次

最近记录:

12 年,3 月 前