Cannot add packages (maybe due to corporate firewall?)

I have successfully built Julia 1.2 on my work computer (macOS 10.14.2 Mojave), but cannot add packages. These are the messages I get:

julia> VERSION

(v1.2) pkg> add BenchmarkTools
   Cloning default registries into `~/.julia`
   Cloning registry from ""
ERROR: failed to clone from, error: GitError(Code:ERROR, Class:OS, failed to connect to Operation timed out)

I thought this might be due to the corporate firewall, so I tried the trick described in to add the proxy settings to ~/.gitconfig. I also tried to let Git to use https instead of git by following Still unsuccessful.

Any suggestions?

1 Like

I use win 10 and have a workaround to install packages.
For this you should to be able to reset IE settings in internet options- Advanced tab. If this is possible, reset the setting and after that you can connect to the any wifi network and install packages.

To come back to corporate network, restart you computer or just log off and log in and it should work.

My corporate admin blocked this. R can install flawless from behind firewalls most of the time so maybe also need to look at their approach. Unfortunate, I have 0 knowledge of networking so have gave up installing Julia at work…

More information about the problem. According to my original posting, it seemed that cloning the registry from was taking forever. So, I tried to add BenchmarkTools by directly specifying its repository address. Then I get the following message:

(v1.2) pkg> add
   Cloning git-repo ``
ERROR: failed to clone from, error: GitError(Code:ERROR, Class:OS, failed to connect to Operation timed out)

Again, cloning the Git repository for BenchmarkTools takes forever. This is strange, though, because in the terminal I can git clone with no problem:

$ git clone
Cloning into 'BenchmarkTools.jl'...
remote: Enumerating objects: 1230, done.
remote: Total 1230 (delta 0), reused 0 (delta 0), pack-reused 1230
Receiving objects: 100% (1230/1230), 310.90 KiB | 1.16 MiB/s, done.
Resolving deltas: 100% (815/815), done.

So, it seems that the proxy settings are actually working for Git; it is just that Julia does not recognize these settings for some reason. This is weird, because ENV["http_proxy"]and ENV["https_proxy"] in the Julia REPL show the correct proxy information specified in my .bashrc.

To further verify my theory that the proxy settings for Git are correct but Julia does not recognize them properly, I tried to remove the proxy information in .bashrc by commenting the export http_proxy=... and export https_proxy=... lines. Then, I was no longer able to git clone in the terminal. Here is the result of the same command as above:

$ git clone
Cloning into 'BenchmarkTools.jl'...
fatal: unable to access '': Failed to connect to port 443: Operation timed out

As you can see, the error message is nearly the same as the one I got from pkg> add in the Julia REPL. This means Julia was indeed complaining that it could not see the proxy settings (even though they were set in .bashrc).

Any suggestions?

1 Like

Thanks for the investigation. This is awesome. I also tried to capitalise to HTTP(S)_PROXY but it also didn’t work. And I can confirm that I can clone using Git as well.

I just reported this issue at

Separate issue filed:

1 Like