curl: (28) Failed to connect to raw.githubusercontent.com port 443: Connection timed out

51.8k Views Asked by At

I am facing one error while installing FCL-CLI on my system (linux). The command I have used is:

sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)"

Error:

curl: (28) Failed to connect to raw.githubusercontent.com port 443

NEED HELP!

12

There are 12 best solutions below

4
On

Set DNS 8.8.8.8 in network will resolve this

2
On

100% Working Solution

This my fix your problem.

Change from network in setting.

enter image description here

3
On

Faced the same issue while trying to install nvm on ubuntu. Following steps solved my issue:

1)Open the /etc/hosts file using

                          $ sudo nano /etc/hosts

2)Enter your password.

3)Add the following IP address at the end of the file:

                185.199.108.133 raw.githubusercontent.com

4)Save and close the file.

5)Now Try installing Again.

0
On

If you are in India try using a VPN :)

Because https://raw.githubusercontent.com/ is blocked by many ISPs in India. So using a different name server technically unblocks those websites. You can also use Google public DNS(8.8.4.4 or 8.8.8.8)

2
On

if anyone's from india and getting this error just change the network and try. Mine was jio and not working but it worked with airtel.

0
On

Use a VPN or go to 1.1.1.1 in your browser and use WRAP by Cloudflare. Worked for me

0
On

First do ping raw.githubusercontent.com Identify the IP address

Example: Ip Address: 185.199.108.133

Open the /etc/hosts file using $ sudo nano /etc/hosts

and then add following IP

185.199.108.133 raw.githubusercontent.com

Then save it

Finally, try to re-run your command or shell script.

0
On

For Windows Users:

  1. Go to the Control Panel.

  2. Click Network and Internet > Network and Sharing Center > Change adapter settings.

  3. Select the connection for which you want to configure Google Public DNS. For example:

    3.1 To change the settings for an Ethernet connection, right-click the Ethernet interface and select Properties. 3.2 To change the settings for a wireless connection, right-click the Wi-Fi interface and select Properties.

If you are prompted for an administrator password or confirmation, type the password or provide confirmation.

  1. Select the Networking tab. Under This connection uses the following items, select Internet Protocol Version 4 (TCP/IPv4) or Internet Protocol Version 6 (TCP/IPv6) and then click Properties.

  2. Click Advanced and select the DNS tab. If there are any DNS server IP addresses listed there, write them down for future reference, and remove them from this window.

  3. Click OK.

  4. Select Use the following DNS server addresses. If there are any IP addresses listed in the Preferred DNS server or Alternate DNS server, write them down for future reference.

  5. Replace those addresses with the IP addresses of the Google DNS servers:

For IPv4: 8.8.8.8 and/or 8.8.4.4. For IPv6: 2001:4860:4860::8888 and/or 2001:4860:4860::8844. For IPv6-only: you can use Google Public DNS64 instead of the IPv6 addresses in the previous point.

  1. Test that your setup is working correctly; see Test your new settings.

  2. Repeat the procedure for additional network connections you want to change.

Ref: [https://developers.google.com/speed/public-dns/docs/using][Configure your network settings to use Google Public DNS]

0
On

Steps for (linux/mac)

Note: Make sure git is installed

  1. Somehow save this file in local (copy content and save) as install.sh: https://github.com/Homebrew/install/blob/master/install.sh

  2. In terminal, navigate to saved file location. Run the command to make it executable; ubuntu@user:~$chmod +x install.sh

  3. Run in terminal: ubuntu@user:~$./install.sh

  4. Follow the last logs in terminal. It will have installed location path.

  5. Add it to PATH in .profile file: export PATH=$PATH:/home/linuxbrew/.linuxbrew/bin (Please do not copy this path. Look for path in installation logs in step 3.)

  6. Run in terminal: ubuntu@user:~$source .profile

  7. Run in terminal: ubuntu@user:~$brew -v This should give you installed brew version.

Thanks

4
On

If you are using jio india then use another operator. It will work.

0
On

Solution with curl --resolve

As already mentioned by others, it could be a DNS issue and adding an entry in /etc/host should work. But the downside is that you might need sudo access to do so. An alternate way to solve is to temporarily resolve DNS within the curl command itself using --resolve flag.

curl --resolve raw.githubusercontent.com:443:185.199.108.133 https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -o "$HOME/oh-my-zsh-install.sh"

For more details check this: curl_custom_dns

1
On

Same error occurs to me in ubuntu 22.04.02 If you connected in WiFi then this will be use full, Go to WiFi -> Press setting button appears in the connected WiFi -> Select third option " IPv4 " -> Disable the automatic option in DNS -> Fill with 8.8.8.8 -> apply Now re-run the code