背景
使用官網(wǎng)命令安裝 oh-my-zsh 時報錯:curl: (7) Failed connect to raw.github.com:443; Connection refused
官網(wǎng)命令
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
就可以了(打開網(wǎng)址應(yīng)該知道什么作用了)
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 -)"