Julia homebrew install git Error

Not sure if you solved it in the mean time, but I got bitten by this today and found your post looking for a solution. The problem is libgit2 is too new in homebrew now:
https://github.com/JuliaLang/julia/issues/19793

If you cleaned up your homebrew, the following should allow a downgrade of libgit2:
(replace /usr/local with brew --prefix if different)

cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
git checkout 3280e6229c624332ec45212b1ae9e810e50b1a81 libgit2.rb
brew reinstall libgit2