curl: (7) Failed connect to raw.github.com:443; Connection refused

背景

使用官网命令安装 oh-my-zsh 时报错:curl: (7) Failed connect to raw.github.com:443; Connection refused

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

或者

sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"

解决

把 raw.github.com 改成 raw.githubusercontent.com,如下:

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

或者

sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"

终极

如果还是不行的话,在链接前面再加上 https://ghproxy.com 就可以了(打开网址应该知道什么作用了)

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

或者

sh -c "$(wget https://ghproxy.com/https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"

你可能感兴趣的:(curl: (7) Failed connect to raw.github.com:443; Connection refused)