Homebrew 安装的 SSL 问题

标签 ssl terminal homebrew osx-yosemite

当我尝试使用终端安装 Homebrew 时失败并出现以下错误:

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1

Press RETURN to continue or any other key to abort
==> Downloading and installing Homebrew...
fatal: unable to access 'https://github.com/Homebrew/homebrew/': Could not resolve host: github.com
Failed during: git fetch origin master:refs/remotes/origin/master -n --depth=1

我认为这是因为代理设置。所以我尝试使用以下方法重置 git 代理:

git config --global --unset http.proxy

git config --global --unset core.gitproxy

但又失败了。

请帮忙。

最佳答案

你必须为 git 设置代理

git config --global --add http.proxy proxyHost:proxyPort

但您还必须为 Homebrew 本身设置代理:

export ALL_PROXY=proxyHost:proxyPort

关于Homebrew 安装的 SSL 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32478422/

相关文章:

ruby - 如何列出任何非依赖项的 gem(即,类似于 Homebrew 中的 `brew leaves`)

ruby-on-rails - SSL_connect 返回=1 errno=0 状态=SSLv3 读取服务器证书,证书验证失败

macos - 尝试安装 pyenv 时出现 Homebrew 错误

svn - SSL:目的地更改 IP 地址后无法识别证书

terminal - Grunt - 从命令行传递文件名变量

linux - 如何将 tcptrack 的输出保存到文本文件中

installation - `brew link unbound` 返回 `/usr/local/sbin is not writable` 错误

homebrew - 通过 brew 安装 yum 的确切命令是什么?

ssl - 尝试了解 Tor 及其与 SSL 的关系

使用 Java 6、HTMLUnit 和 Bouncy CaSTLe 的 TLSv1 SSL 握手失败