'Installing homebrew but it gives 404 errror

I am trying to download homebrew from brew.sh for mac, but when I paste the command in the terminal it says curl: (22) The requested URL returned error: 404. The command I am using is /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)". Is the download site currently down?



Solution 1:[1]

According to this github issue, there is an issue with Github. The Homebrew website has been updated and instead of using the HEAD branch we now use the master branch.

Instead of

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Use

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

To uninstall Homebrew, use the master branch as well

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1