Apple - How to install an homebrew package behind a proxy?

To run Homebrew or Curl behind a proxy :

export ALL_PROXY=$http_proxy:port 

or

export ALL_PROXY=proxyIP:port

After this is done, installation worked smoothly.


Try run brew like this:

http_proxy=https://user:password@proxy:port https_proxy=https://user:password@proxy:port brew install PACKAGE

The source is here: https://juanchorossi.com/osx-set-brew-proxy-server/


For SOCKS5 proxy:

ALL_PROXY=socks5://127.0.0.1:9001 brew upgrade

Tags:

Proxy

Homebrew