# Julia 1.6 corporate firewall \`could not download https://pkg.julialang.org/registries\`

**URL:** <https://discourse.julialang.org/t/julia-1-6-corporate-firewall-could-not-download-https-pkg-julialang-org-registries/60665>\
**Category:** General Usage\
**Created:** [May 6, 2021, 4:06pm UTC](https://discourse.julialang.org/t/julia-1-6-corporate-firewall-could-not-download-https-pkg-julialang-org-registries/60665 "2021-05-06T16:06:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjstickel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jjstickel/32/19536_2.png) [@jjstickel](https://discourse.julialang.org/u/jjstickel)\
**Post date:** [May 6, 2021, 4:06pm UTC](https://discourse.julialang.org/t/julia-1-6-corporate-firewall-could-not-download-https-pkg-julialang-org-registries/60665/1 "2021-05-06T16:06:12Z")

</div>

I’m having trouble with a corporate MITM firewall and Julia-1.6.x, just with fetching `https://pkg.julialang.org/registries`.

```julia
(testing) pkg> up
    Updating registry at `~/.julia/registries/General`
┌ Warning: could not download https://pkg.julialang.org/registries
└ @ Pkg.Types /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_julia/julia/work/julia-1.6.1/usr/share/julia/stdlib/v1.6/Pkg/src/Types.jl:980
julia> import Downloads

julia> Downloads.download("https://pkg.julialang.org/registries", stdout)
ERROR: SSL: certificate verification failed (result: 5) while requesting https://pkg.julialang.org/registries

```

On my home network, there is no error. I found other discussions about this, but my issue seems to be different. I’m on a Mac (10.15.7), and I have several things installed via macports, including curl and openssl that are first in my path. I copied my corporate cert file `corporate.pem` to `/opt/local/etc/openssl/` and ran `openssl rehash /opt/local/etc/openssl/`. After that, and using `export SSL_CERT_DIR="/opt/local/etc/openssl/"`, I get instead:

```julia
julia> import NetworkOptions

julia> NetworkOptions.ca_roots_path()
"/opt/local/etc/openssl/"
julia> import Downloads

julia> Downloads.download("https://pkg.julialang.org/registries", stdout)
┌ Error: curl_easy_setopt: 4
└ @ Downloads.Curl /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_julia/julia/work/julia-1.6.1/usr/share/julia/stdlib/v1.6/Downloads/src/Curl/utils.jl:36
/registry/23338594-aafe-5451-b93e-139f81909106/4475704d0eb7b01b2ac0c1e3a3f08b98cb7ac8c8
Base.TTY(RawFD(14) open, 0 bytes waiting)

```

I am not able to make much of this error. But it looks like the registry was downloaded? Suggestions?

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [May 7, 2021, 8:06pm UTC](https://discourse.julialang.org/t/julia-1-6-corporate-firewall-could-not-download-https-pkg-julialang-org-registries/60665/2 "2021-05-07T20:06:38Z")

</div>

Perhaps:

```julia
ENV["JULIA_SSL_NO_VERIFY_HOSTS"] = "julialang.org"

```

or similar like

```julia
ENV["JULIA_SSL_NO_VERIFY_HOSTS"] = "pkg.julialang.org"

```

from this thread:

> [@Julia 1.6 libcurl firewall download issue: Windows Schannel certificate revocation check failure](https://discourse.julialang.org/t/julia-1-6-libcurl-firewall-download-issue-windows-schannel-certificate-revocation-check-failure/58021):
>
> In Julia 1.5.3, I had https-proxy, http\_proxy, html\_proxy, SSL\_CERT\_FILE set in the environment variables. I also had a \_curlrc file with “insecure” in it in my home directory as well as a .condarc to get things working through our firewall. The SSL\_CERT\_FILE pointed to a .PEM file. I know little about what this all means. In Julia 1.6, I was told by the system that I needed to remove the SSL\_CERT\_FILE and not have a JULIA\_SSL\_CA\_ROOTS\_PATH set to anything. In 1.6, that seems to work for m…

---

<div class="post-metadata">

**Author:** ![jjstickel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jjstickel/32/19536_2.png) [@jjstickel](https://discourse.julialang.org/u/jjstickel)\
**Post date:** [May 10, 2021, 4:33pm UTC](https://discourse.julialang.org/t/julia-1-6-corporate-firewall-could-not-download-https-pkg-julialang-org-registries/60665/3 "2021-05-10T16:33:21Z")

</div>

Yes, `ENV["JULIA_SSL_NO_VERIFY_HOSTS"] = "pkg.julialang.org"` does resolve the initial warning/error that I reported.

However, I think my effort to use my corporate (MITM-firewall) certs is also working but is producing spurious errors, similar to what is described [here](https://discourse.julialang.org/t/julia-1-6-0-package-manager-error-message-noise-in-custom-docker-image-on-add-update/58037/14).

---

<div class="post-metadata">

**Author:** ![Allan\_Baker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/allan_baker/32/42645_2.png) [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Post date:** [May 18, 2021, 1:15pm UTC](https://discourse.julialang.org/t/julia-1-6-corporate-firewall-could-not-download-https-pkg-julialang-org-registries/60665/4 "2021-05-18T13:15:53Z")

</div>

I’m tagging on to the issue a little. I’ve noticed that Julia doesn’t look at my environment variables. I have to set these ENV variables every time from within Julia repl for it to work.
