我将.bashrc设置为以下行:
export {no_proxy,NO_PROXY}=localhost,127.0.0.1
并测试curl是否适用于no_proxy:
/usr/bin/curl https://mirrorservice.org/pub/OpenBSD/LibreSSL/libressl-2.8.2.tar.gz --connect-timeout 5
这有效。
使用curl
升级软件包以获取二进制文件会导致错误:
==> Upgrading libressl
Downloading https://mirrorservice.org/pub/OpenBSD/LibreSSL/libressl-2.8.2.tar.gz
/usr/bin/curl -q --show-error https://mirrorservice.org/pub/OpenBSD/LibreSSL/libressl-2.8.2.tar.gz --connect-timeout 5
错误是:
Could not resolve proxy: proxy.[MY_PROXY_NAME]
Error: An exception occurred within a child process:
因为curl包含-q命令:
-q, --disable
If used as the first parameter on the command line, the curlrc
config file will not be read and used.
我尝试了以下命令:
$ no_proxy=localhost brew upgrade -verbose
但这仍然行不通。我如何跳过绕过curlrc的Homebrew。