Julia homebrew install git Error


#1

julia> Pkg.init()
INFO: Initializing package repository /var/root/.julia/v0.5
INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl
ERROR: GitError(Code:ERROR, Class:Invalid, Invalid version 0 on git_proxy_options)
in macro expansion at ./libgit2/error.jl:99 [inlined]
in clone(::String, ::String, ::Base.LibGit2.CloneOptions) at ./libgit2/repository.jl:191
in #clone#109(::String, ::Bool, ::Ptr{Void}, ::Nullable{Base.LibGit2.AbstractCredentials}, ::Function, ::String, ::String) at ./libgit2/libgit2.jl:327
in (::Base.LibGit2.#kw##clone)(::Array{Any,1}, ::Base.LibGit2.#clone, ::String, ::String) at ./:0
in (::Base.Pkg.Dir.##4#6{String,String})() at ./pkg/dir.jl:49
in cd(::Base.Pkg.Dir.##4#6{String,String}, ::String) at ./file.jl:59
in init(::String, ::String) at ./pkg/dir.jl:47
in init() at ./pkg/pkg.jl:70

julia> run(which -a git)
/usr/bin/git

julia> run(git --version)
git version 2.10.1 (Apple Git-78)

julia>


#2

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:

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