我的 Macbook 中有以下变量。但是,当我尝试安装 gh 时,出现以下错误:
导出 HTTPS_PROXY=http://myproxy.com:8080
导出 HTTP_PROXY=http://myproxy.com:8080
wferreir@QQN6DR99LY ~ % brew install gh
警告: git 2.36.1 已经安装并且更新到-date。要重新安装 2.36.1,请运行: brew reinstall git 警告:/opt/homebrew 中没有远程“来源”,正在跳过更新!警告:/opt/homebrew/Library/Taps/homebrew/homebrew-core 中没有远程“来源”,正在跳过更新!
==> 正在下载 https://ghcr.io/v2/homebrew/core/gh/manifests/2.10.1
curl:(22)请求的URL返回错误:407
错误:gh:未能下载资源“gh_bottle_manifest”
下载失败:https://ghcr.io/v2/homebrew/core/gh/manifests/2.10.1 wferreir@QQN6DR99LY ~ %
回答1
我通过为 GIT 配置代理解决了这个问题:
git config --global http.proxy http://proxyUsername:proxyPassword@proxy.server.com:port