Error while installing a Julia Package

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 https://github.com/JuliaRegistries/General.git ┌ 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 https://github.com/JuliaLinearAlgebra/LinearMaps.jl.git ERROR: failed to clone from https://github.com/JuliaLinearAlgebra/LinearMaps.jl.git, 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

Alternatively:

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

ENV["HTTP_PROXY"] = "http://127.0.0.1:your port"
ENV["HTTPS_PROXY"] = "http://127.0.0.1:your 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.