Homebrew installation on Mac OS X Failed to connect to raw.githubusercontent.com port 443

Works for me. Unless its a real problem with github, which it may be but I'm going to guess that its not, its probably a problem with your connection.

Can you get to the same URL via a browser?

https://raw.githubusercontent.com/Homebrew/install/master/install

If you get an error there too, you know what your problem is. (Talk to your network admin)

If that works...maybe try doing just the "curl" command in your terminal to see if curl gives a more specific error?

Also, if that does work, save that file to a file on your computer (brew_install.rb) and then run it via

ruby brew_install.rb

It was a company proxy problem for me and the solution as mentioned here worked for me.

export HTTPS_PROXY=https://<proxy.mycompany>:<port>

git config --global https.proxy $HTTPS_PROXY

git config --global --get https.proxy


The accepted Answer is outdated now. But based on the answer I solved the problem by:

  1. open the home page of brew https://brew.sh/
  2. copy the URL from the install cmd and open it on your browser https://raw.githubusercontent.com/Homebrew/install/master/install.sh
  3. right-click and save it to your computer
  4. open a terminal and run it with: /bin/bash path-to/install.sh