curl: (7) Failed to connect to raw.github.com port 443: Operation timed out

1.描述

在安装ohmyzsh时提示错误

curl: (7) Failed to connect to raw.github.com port 443: Operation timed out
2.尝试

网上搜索了下,似乎将github换成githubusercontent可以解决问题,可惜试过后不行。
猜想是不是这个网址被禁了,国内会不会有镜像,找了找似乎有
国内的地址是:https://gitee.com/mirrors/oh-my-zsh

3.解决

通过curl或者wget安装

  • curl
sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)"
  • wget
sh -c "$(wget -O- https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)"

说明:
安装homebrew时也会遇到被禁的问题,提供一个国内能用的地址

/bin/zsh -c "$(curl -fsSL [https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh]
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。