Error while installing a Julia Package behind a Proxy

I am trying to install a package iTensor in Julia as (@v1.7) pkg> add ITensors but I am getting the following error. Pl note that my OS Ubuntu is behind the proxy Network.

Updating registry at ~/.julia/registries/General Updating git-repo ┌ Error: Some registries failed to update: │ — /home/sachin/.julia/registries/General — failed to fetch from repo └ @ Pkg.Registry /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/Pkg/src/Registry/Registry.jl:450 Resolving package versions... Cloning [7a12625a-238d-50fd-b39a-03d52299707e] LinearMaps from ERROR: failed to clone from, error: GitError(Code:ERROR, Class:HTTP, http parser error: invalid constant string)

Are you behind a company firewall? Ok, you already said that you are behind a proxy. You might be able to configure the proxy for Julia.

Did you try:

In the .gitconfig file, under the [http] section, the proxy variable should be something like

proxy = http://user:passwd@proxy.addr:port/

Notice the trailing /

1 Like


if you are using proxy, add these two lines to C:\Julia\etc\julia\startup.jl file:

ENV["HTTP_PROXY"] = " port"
ENV["HTTPS_PROXY"] = " port"

none of these worked!

Well, I would just connect via WLAN to my privat phone… But I know that this is not possible for everybody.

Have you solved this problem now?