Install oh-my-zsh error 443 solution

Preface

The author's previous laptop was flooded and had to change to a work computer. As the saying goesThe computer changed for a while, and it took two days for the crematorium, The new computer environment variables, tools and software are not installed, it needs to be reorganized to be able to work handily. To be honest, this will not be done in a short while, especially when the network environment is fluctuating from time to time, the following records the process of installing oh-my-zsh error 443 after installing

1. Install oh-my-zsh error 443

oh-my-zshIt is a command terminal plug-in, with many useful auxiliary functions, it can be said that it is necessary for programmers to work. There is a quick command to install the plug- in in the ohmyzsh github repository, generally as follows,Before installation, confirm that Git and zsh have been installed on the computer ( cat /etc/shellscommand can view the installed shell)

// 命令
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Use this command has a very high probability encounter the following 443 error, can not access https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.shthis address, I would unfortunately become a victim of this probability

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

2. Solution

Some online solutions is directly on github ohmyzshproject clone down, and then run the project inside the install.shscript , this methodThe author's personal test is invalid

An effective solution is as follows. All similar 443 problems can be solved by this method.

  1. Use the following web analytic tool to view raw.githubusercontent.comthe IP address
    https://site.ip138.com/raw.githubusercontent.com/ , you can see the domestic IP is available151.101.76.133

Insert picture description here

  1. Modify hosts, Ubuntu, CentOS and macOS can be entered directly in the terminal
    sudo vim /etc/hosts
    
    添加以下内容:
    151.101.76.133 raw.githubusercontent.com
    
    After the modification is completed, run the following installation command again and enter the following interface to install successfully
    sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
    
    Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_45505313/article/details/108006795