brew 装redis报错:
brew install redis
==>Fetching dependencies for redis: ca-certificates and openssl@1.1
==>Fetching ca-certificates
==>Downloading https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles//ca-certif
Already downloaded: /Users/lishouzhuang/Library/Caches/Homebrew/downloads/9f9800e6ab85676885751e7dd738f512132b45c82bf81a4e11506e65572688aa--ca-certificates-2023-01-10.all.bottle.tar.gz
==>Fetching openssl@1.1
==>Downloading https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles//openssl%4
######################################################################## 100.0%
==>Fetching redis
==>Downloading https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles//redis-7.0
######################################################################## 100.0%
==>Installing dependencies for redis: ca-certificates and openssl@1.1
==>Installing redis dependency: ca-certificates
fatal: not in a git directory
Error: Command failed with exit 128: git
解决办法:
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-core
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask
既可