brew install 时发生https 报错

529 阅读1分钟

在使用mac自带工具进行一些包安装时,时常会遇到类似报错

...
Cloning into '/opt/homebrew/Library/Taps/clojure/homebrew-tools'...

fatal: unable to access 'https://github.com/clojure/homebrew-tools/': The requested URL returned error: 500
...

或者
Error: Failure while executing; `git clone https://github.com/clojure/homebrew-tools /opt/homebrew/Library/Taps/clojure/homebrew-tools --origin=origin --template=` exited with 128.

fatal: unable to access 'https://github.com/clojure/homebrew-tools/': SSL connection timeout


一些包在clone github 包时使用了https的方式,ssl链接报错,类似的使用 curl 命令也会发生类似的报错,无法打开 raw.githubusercontent.com/Homebrew/in… 类似开头的网址; 查询一些原因,可能是代理导致的,因为一般公司内网会有一些代理设置,也可能是未安装github的认证证书之类,可以参考下面链接的一些解决方式; stackoverflow.com/questions/2…

但如果嫌麻烦,或者比较紧急,可以尝试 brew 加上 -k 直接搞定安装, 类似: brew install -k clojure/tools/clojure

在下面参考链接里有提到用Safari打开github网址然后安装证书也可解决这个问题,可以尝试一下;

参考链接:


github.com/Homebrew/le… www.digicert.com/blog/expire…