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

74,967

Solution 1

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

Solution 2

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

Solution 3

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

Solution 4

I had the same error,

- Disabled VPN

tried again installing without VPN It worked for me.

Solution 5

I've seen this a few times on other people's machines and it seems to be fixed after you install xcode, i.e. xcode-select --install

Share:
74,967
Yosuva Arulanthu
Author by

Yosuva Arulanthu

Expert in following Areas, The professional level in Java-based Automation framework development(cross-browser and multi-locale compatible). Expertise in web automation testing using Selenium Web driver(JAVA API). Expertise in Mobile automation testing using Appium, SeeTest and Perfecto.(JAVA API) Excellent programming skills in Java, Python, HTML and VBScript Familiar with REST API/Web Services testing(Java) Extensively involved in Functional Regression testing cycle including identification of Test Scenarios, Test cases, Execution and Tracking of defects. Interested in web design and development(http://yosuva.com) GitHub:https://github.com/ayosuva

Updated on January 12, 2022

Comments

  • Yosuva Arulanthu
    Yosuva Arulanthu over 2 years

    When I try to install Homebrew, I am getting following connection refused error. Please help me to solve this problem.

    $ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
    
  • Haresh Chaudhary
    Haresh Chaudhary over 5 years
    Downloading the file and running the script locally on terminal worked. Thanks!
  • Aliqua
    Aliqua over 3 years
    You should try and provide some additional comments along with your answer to help anyone reading your response better understand.
  • Michael Heil
    Michael Heil over 3 years
    Please don't post only code as answer, but also provide an explanation what your code does and how it solves the problem of the question. Answers with an explanation are usually more helpful and of better quality, and are more likely to attract upvotes. This should be considered especially for very old questions that already have multiple upvoted answers.
  • yolob 21
    yolob 21 about 3 years
    This worked too. Simplest solution if one is connected via a vpn to access company resources disconnecting the vpn worked made it work immediately
  • Vapid
    Vapid over 2 years
    This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review