# Error while installing a Julia Package behind a Proxy

**URL:** <https://discourse.julialang.org/t/error-while-installing-a-julia-package-behind-a-proxy/79674>\
**Category:** General Usage\
**Created:** [April 19, 2022, 6:20am UTC](https://discourse.julialang.org/t/error-while-installing-a-julia-package-behind-a-proxy/79674 "2022-04-19T06:20:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_SACHIN](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/_sachin/32/35272_2.png) [@\_SACHIN](https://discourse.julialang.org/u/_SACHIN)\
**Post date:** [April 19, 2022, 6:20am UTC](https://discourse.julialang.org/t/error-while-installing-a-julia-package-behind-a-proxy/79674/1 "2022-04-19T06:20:07Z")

</div>

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) `

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [April 19, 2022, 7:48am UTC](https://discourse.julialang.org/t/error-while-installing-a-julia-package-behind-a-proxy/79674/2 "2022-04-19T07:48:01Z")

</div>

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 `/`

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [April 19, 2022, 7:54am UTC](https://discourse.julialang.org/t/error-while-installing-a-julia-package-behind-a-proxy/79674/3 "2022-04-19T07:54:13Z")

</div>

Alternatively:

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

```julia
ENV["HTTP_PROXY"] = "http://127.0.0.1:your port"
ENV["HTTPS_PROXY"] = "http://127.0.0.1:your port"

```

---

<div class="post-metadata">

**Author:** ![\_SACHIN](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/_sachin/32/35272_2.png) [@\_SACHIN](https://discourse.julialang.org/u/_SACHIN)\
**Post date:** [April 19, 2022, 8:28am UTC](https://discourse.julialang.org/t/error-while-installing-a-julia-package-behind-a-proxy/79674/4 "2022-04-19T08:28:18Z")

</div>

none of these worked!

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [April 19, 2022, 10:31am UTC](https://discourse.julialang.org/t/error-while-installing-a-julia-package-behind-a-proxy/79674/5 "2022-04-19T10:31:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![coldwater-fish](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/coldwater-fish/32/46664_2.png) [@coldwater-fish](https://discourse.julialang.org/u/coldwater-fish)\
**Post date:** [February 8, 2023, 2:23am UTC](https://discourse.julialang.org/t/error-while-installing-a-julia-package-behind-a-proxy/79674/6 "2023-02-08T02:23:46Z")

</div>

Have you solved this problem now?
