I think I’m running into a similar issue running julia from within docker behind a corporate proxy. I have a dockerfile where I can install a bunch of packages, build julia from source, use curl
, git clone
, and similar from the command line, but can’t run Pkg.init()
from within julia without getting the following error:
INFO: Initializing package repository /pkg/v0.6
INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl
ERROR: GitError(Code:ERROR, Class:OS, Failed to connect to github.com: Connection refused)
Stacktrace:
[1] macro expansion at ./libgit2/error.jl:99 [inlined]
[2] clone(::String, ::String, ::Base.LibGit2.CloneOptions) at ./libgit2/repository.jl:276
[3] #clone#100(::String, ::Bool, ::Ptr{Void}, ::Nullable{Base.LibGit2.AbstractCredentials}, ::Function, ::String, ::Str
ing) at ./libgit2/libgit2.jl:562
[4] (::Base.LibGit2.#kw##clone)(::Array{Any,1}, ::Base.LibGit2.#clone, ::String, ::String) at ./<missing>:0
[5] (::Base.Pkg.Dir.##8#10{String,String})() at ./pkg/dir.jl:55
[6] cd(::Base.Pkg.Dir.##8#10{String,String}, ::String) at ./file.jl:70
[7] init(::String, ::String) at ./pkg/dir.jl:53
[8] init() at ./pkg/pkg.jl:85
I have HTTP_PROXY
, HTTPS_PROXY
, NO_PROXY
, and the lowercase versions set, and also tried using the same settings in git config
. On my development machine this works with just the environment variables set and no global .gitconfig
.