# Julia 1.6: using curl behind proxy for artifacts downloads on windows

**URL:** https://discourse.julialang.org/t/julia-1-6-using-curl-behind-proxy-for-artifacts-downloads-on-windows/58029
**Category:** New to Julia
**Created:** [March 26, 2021, 4:25pm UTC](https://discourse.julialang.org/t/julia-1-6-using-curl-behind-proxy-for-artifacts-downloads-on-windows/58029 "2021-03-26T16:25:44Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![lrnv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lrnv/32/19373_2.png) [@lrnv](https://discourse.julialang.org/u/lrnv)
#### Post date: [March 26, 2021, 4:25pm UTC](https://discourse.julialang.org/t/julia-1-6-using-curl-behind-proxy-for-artifacts-downloads-on-windows/58029/1 "2021-03-26T16:25:44Z")

</div>

Hey,

I just removed my 1.5.3 julia to install the new 1.6 on a window machine behind a proxy.

For some reasons Pkg cannot download artifacts anymore:

```julia
(@v1.6) pkg> add Distributions
   Updating registry at `C:\Users\u009192\.julia\registries\General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Resolving package versions...
 Downloading artifact: Rmath
    Downloading [>] 0.0 %  

```

It hangs and never stop.

I setted up my `.curlrc` so that curl works correctly under my proxy:

```julia
julia> run(`curl https://google.com`)
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="https://www.google.com/">here</A>.
</BODY></HTML>
Process(`curl https://google.com`, ProcessExited(0))

julia>

```

Standard git operations also works correctly, since the General registry can be removed, reinstalled, updated, etc… I can install artifact-less packages without any issue.

Thinking Pkg was using Powershell to download the artifacts, I tried [this solution](https://discourse.julialang.org/t/downloading-packages-fails-on-work-network/30700/11) but it did not work, it still hangs on artifacts.

`Base.download("https://google.com")` has the same hanging issue. By looking around, upon forcing some environment variables that matches my `.curlrc` before launching julia by:

```julia
export BINARYPROVIDER_DOWNLOAD_ENGINE="curl --proxy <my_proxy> --ssl-no-revoke --insecure"

```

I am able to make `Base.download` work, but not for https:

```julia
julia> Base.download("google.com")
"C:\\Users\\XXX\\AppData\\Local\\Temp\\jl_D511.tmp"

julia> Base.download("https://google.com")
ERROR: HTTP/1.0 200 Connection established (schannel: next InitializeSecurityContext failed: Unknown error (0x80092012)) while requesting https://google.com
Stacktrace:
 [Very long stacktrace, the same one.]
julia> 

```

Moreover, I tried DebugArtifacts and the same thing occurs:

```julia
julia> using DebugArtifacts

julia> debug_artifact("OpenSpecFun")
[ Info: Platform: Windows x86_64 {cxxstring_abi=cxx11, julia_version=1.6.0, libgfortran_version=5.0.0}
Julia Version 1.6.0
Commit f9720dc2eb (2021-03-24 12:55 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)

[ Info: Downloading Artifacts.toml to C:\Users\u009192\AppData\Local\Temp\jl_GfvfmC\Artifacts.toml...
ERROR: HTTP/1.0 200 Connection established (schannel: next InitializeSecurityContext failed: Unknown error (0x80092012)) while requesting https://raw.githubusercontent.com/JuliaBinaryWrappers/OpenSpecFun_jll.jl/master/Artifacts.toml
Stacktrace:
 [Very long stacktrace, the same one]

```

But with a simple run of curl, everything is still OK.

```julia
julia> run(`curl https://google.com`)
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="https://www.google.com/">here</A>.
</BODY></HTML>
Process(`curl https://google.com`, ProcessExited(0))

julia> 

```

**How can i tell the libcurl that is inside julia to respond to my `.curlrc` ?**  
**Can i pass directly some parameters (the same i passed in my `.curlrc` to Julia’s libcurl ? How ?**

---

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [March 26, 2021, 6:00pm UTC](https://discourse.julialang.org/t/julia-1-6-using-curl-behind-proxy-for-artifacts-downloads-on-windows/58029/2 "2021-03-26T18:00:47Z")

</div>

3 posts were merged into an existing topic: [Julia 1.6 new Package Manager – curl firewall problems](https://discourse.julialang.org/t/julia-1-6-new-package-manager-curl-firewall-problems/58021)

---

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [March 26, 2021, 6:00pm UTC](https://discourse.julialang.org/t/julia-1-6-using-curl-behind-proxy-for-artifacts-downloads-on-windows/58029/3 "2021-03-26T18:00:47Z")

</div>



---

<div class="post-metadata">

### Author: ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)
#### Post date: [April 20, 2021, 7:46pm UTC](https://discourse.julialang.org/t/julia-1-6-using-curl-behind-proxy-for-artifacts-downloads-on-windows/58029/4 "2021-04-20T19:46:40Z")

</div>

Libcurl does not have any way to read `.curlrc` files — those files only apply to the command-line tool, not the library. See [this StackOverflow answer](https://stackoverflow.com/a/3712594/659248) by the author of curl and libcurl. Have you tried setting `export JULIA_SSL_NO_VERIFY=**` in the shell?

---

<div class="post-metadata">

### Author: ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)
#### Post date: [April 20, 2021, 7:46pm UTC](https://discourse.julialang.org/t/julia-1-6-using-curl-behind-proxy-for-artifacts-downloads-on-windows/58029/5 "2021-04-20T19:46:50Z")

</div>



---

<div class="post-metadata">

### Author: ![lrnv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lrnv/32/19373_2.png) [@lrnv](https://discourse.julialang.org/u/lrnv)
#### Post date: [April 20, 2021, 8:04pm UTC](https://discourse.julialang.org/t/julia-1-6-using-curl-behind-proxy-for-artifacts-downloads-on-windows/58029/6 "2021-04-20T20:04:37Z")

</div>

I used environnement variables as described in this post [Julia 1.6 libcurl firewall download issue: Windows Schannel certificate revocation check failure - #17 by lrnv](https://discourse.julialang.org/t/julia-1-6-new-package-manager-curl-firewall-problems/58021/17) and it finally worked.
