Issue
I have been trying to install azure CLI with homebrew on my mac which is running on my organization proxy. somewhere the proxy is not letting my CURL command to execute. and getting response as below.
tk0991@INHYIMAC0017 ~ % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
curl: (28) Operation timed out after 300736 milliseconds with 0 out of 0 bytes received
Below is the other command and the response to the command that I have tried to install homebrew.
tk0991@INHYIMAC0017 ~ % curl -x http://tk0991:[email protected]:8080 https://raw.githubusercontent.com/HomeBrew/install/HEAD/install.sh curl: (56) Received HTTP code 407 from proxy after CONNECT
How can I overcome this problem and can install homebrew and azure cli. hope I get some help on this.
Solution
From the error message, its pretty clear that your organization's proxy is blocking the connection to home brew installation shell script path. Please follow the below action plans and check if that helps:
Plan 1: If you have a VPN, you could leverage that to bypass the proxy and then try to install it by running your above curl command.
Plan 2: This Homebrew article mentions about configuring the proxy environment variables. Check if setting that helps.
Plan 3:
If the above action plans doesn't help, you could try to download the install.sh
script from a different machine (which is not behind the proxy) and move it to your concerned machine and then grant it executable permissions by running the chmod +x install.sh
command and then run the installation script as shown below:
./install.sh
Plan 4: For troubleshooting the Azure CLI installation issue on Homebrew behind a proxy, then you need to remember that the Homebrew also requires the proxy to be configured to get the right resources. The details are mentioned here.
Plan 5: If none of the above plan helps, you can try checking internally with your organizational proxy team to see if they can allow / whitelist the homebrew endpoints on the proxy.
Hope this helps.
Answered By - NaveenBaliga Answer Checked By - Timothy Miller (WPSolving Admin)