Homebrew behind a proxy

Hi Guys,

I wanted to write this post as I was facing issues while installing formula use homebrew command on Mac OS behind proxy, finally I was able to do it using info given on this page.

Its really simple just use the http_proxy or https_proxy before the brew install command or any brew command you want to run behind proxy.

e.g.

https_proxy=https://username:password@proxy:port brew install apache-spark

http_proxy=http://username:password@proxy:port brew install $other_formula

Also one can set the git config settings for http.proxy and https.proxy like below:

git config –global http.proxy http://username:password@proxy:port

git config –global https.proxy https://username:password@proxy:port

These above settings will make sure to pass through proxies while brew connects to git repository.

Enjoy and thanks for reading.

 

One thought on “Homebrew behind a proxy

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s