Mac OS Homebrew 설치 시 인증서 에러

Homebrew 설치 시 다음과 같은 에러가 발생했다.

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
curl: (60) SSL certificate problem: Untrusted root certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

구글링을 해보니 다음과 같이 시도해서 잘 됐다는 걸 찾았다.

$ /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

위와 같이하니 나는 또 다른 에러가 출력 되었다.

$ /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew

Press RETURN to continue or any other key to abort
==> Downloading and installing Homebrew...
fatal: unable to access 'https://github.com/Homebrew/brew/': SSL certificate problem: Untrusted root certificate
Failed during: git fetch origin master:refs/remotes/origin/master --tags --force
$ git config --global http.sslVerify false

위와 같이 한 후 설치 명령을 다시 수행하니 인스톨이 가능했다.

참고

  • https://stackoverflow.com/questions/23331325/git-ssl-certificate-invalid-certificate-chain-while-accessing
  • https://github.com/Homebrew/legacy-homebrew/issues/32449

Leave a Reply

Your email address will not be published. Required fields are marked *