# Pkg.update() failing in Julia 0.6.4 on Ubuntu 16.04 behind firewall.

**URL:** <https://discourse.julialang.org/t/pkg-update-failing-in-julia-0-6-4-on-ubuntu-16-04-behind-firewall/12957>\
**Category:** General Usage\
**Created:** [August 6, 2018, 8:06pm UTC](https://discourse.julialang.org/t/pkg-update-failing-in-julia-0-6-4-on-ubuntu-16-04-behind-firewall/12957 "2018-08-06T20:06:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhatia](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@abhatia](https://discourse.julialang.org/u/abhatia)\
**Post date:** [August 6, 2018, 8:06pm UTC](https://discourse.julialang.org/t/pkg-update-failing-in-julia-0-6-4-on-ubuntu-16-04-behind-firewall/12957/1 "2018-08-06T20:06:25Z")

</div>

Hello All,  
I recently downloaded JuliaPro version 0.6.4.1 with MKL support and started the REPL from bash shell. Pkg.update() fails, with error messages as below -

`INFO: Updating METADATA... ERROR: METADATA cannot be updated. Resolve problems manually in JuliaPro-0.6.4.1/JuliaPro/pkgs-0.6.4.1/v0.6/METADATA. GitError(Code:ECERTIFICATE, Class:SSL, SSL error: ffffd900[8] - X509 - Certificate verification failed, e.g. CRL, CA or signature check failed) macro expansion at ./libgit2/error.jl:99 [inlined] #fetch#41(::Base.LibGit2.FetchOptions, ::String, ::Function, ::Base.LibGit2.GitRemote, ::Array{AbstractString,1}) at ./libgit2/remote.jl:226 (::Base.LibGit2.#kw##fetch)(::Array{Any,1}, ::Base.LibGit2.#fetch, ::Base.LibGit2.GitRemote, ::Array{AbstractString,1}) at ./<missing>:0 #fetch#84(::String, ::String, ::Array{AbstractString,1}, ::Nullable{Base.LibGit2.AbstractCredentials}, ::Function, ::Base.LibGit2.GitRepo) at ./libgit2/libgit2.jl:312 (::Base.Pkg.Entry.##33#39)(::Base.LibGit2.GitRepo) at ./pkg/entry.jl:371 with(::Base.Pkg.Entry.##33#39, ::Base.LibGit2.GitRepo) at ./libgit2/types.jl:608 update(::String, ::Set{String}) at ./pkg/entry.jl:354 (::Base.Pkg.Dir.##3#6{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}}})() at ./pkg/dir.jl:33 cd(::Base.Pkg.Dir.##3#6{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}}}, ::String) at ./file.jl:70 withenv(::Base.Pkg.Dir.##2#5{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}},String}, ::Pair{String,String}, ::Vararg{Pair{String,String},N} where N) at ./env.jl:157 #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N} where N) at ./pkg/dir.jl:32 update() at ./pkg/pkg.jl:228 eval(::Module, ::Any) at ./boot.jl:235 eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:66 macro expansion at ./REPL.jl:97 [inlined] (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:73 Stacktrace: [1] (::Base.Pkg.Entry.##33#39)(::Base.LibGit2.GitRepo) at ./pkg/entry.jl:378 [2] with(::Base.Pkg.Entry.##33#39, ::Base.LibGit2.GitRepo) at ./libgit2/types.jl:608 [3] update(::String, ::Set{String}) at ./pkg/entry.jl:354 [4] (::Base.Pkg.Dir.##3#6{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}}})() at ./pkg/dir.jl:33 [5] cd(::Base.Pkg.Dir.##3#6{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}}}, ::String) at ./file.jl:70 [6] withenv(::Base.Pkg.Dir.##2#5{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}},String}, ::Pair{String,String}, ::Vararg{Pair{String,String},N} where N) at ./env.jl:157 [7] #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N} where N) at ./pkg/dir.jl:32 [8] update() at ./pkg/pkg.jl:228`

I am behind a corporate firewall with ZScaler and proxy server. http\_proxy, https\_proxy environment variables are already set, the certificate is already installed in system-wide location.

I am able to do a git clone fine from bash shell, for example, the following works -  
`git clone https://github.com/JuliaLang/Example.jl.git`

I searched in documentation and existing threads but could not find a solution. There was some discussion related to same error message but it is related to Windows OS. Can someone please suggest how to resolve this issue?

Thanks,  
Amit

---

<div class="post-metadata">

**Author:** ![noahstier](https://avatars.discourse-cdn.com/v4/letter/n/9dc877/32.png) [@noahstier](https://discourse.julialang.org/u/noahstier)\
**Post date:** [August 6, 2018, 8:48pm UTC](https://discourse.julialang.org/t/pkg-update-failing-in-julia-0-6-4-on-ubuntu-16-04-behind-firewall/12957/2 "2018-08-06T20:48:28Z")

</div>

I believe I have the same problem. Julia version 0.6.4, Ubuntu 16.04.

I am behind a firewall and my company has an ssl certificate file that I installed like this:  
`sudo cp certfile.crt /usr/local/share/ca-certificates/`  
`sudo update-ca-certificates`

But certain programs use their own certificate path instead of the one managed by the system. For example, I had to separately add the certificate file to Firefox using Firefox’s advanced settings gui. I believe something similar is necessary with Julia but I don’t know how to do it.

Below is the error message I get when installing any package.

julia\> Pkg.add(“AnyPackage”)  
INFO: Initializing package repository /home/develop/.julia/v0.6  
INFO: Cloning METADATA from [https://github.com/JuliaLang/METADATA.jl](https://github.com/JuliaLang/METADATA.jl)  
ERROR: GitError(Code:ECERTIFICATE, Class:SSL, SSL error: ffffd900[8] - X509 - Certificate verification failed, e.g. CRL, CA or signature check failed)  
Stacktrace:  
[1] macro expansion at ./libgit2/error.jl:99 [inlined]  
[2] clone(::String, ::String, ::Base.LibGit2.CloneOptions) at ./libgit2/repository.jl:276  
[3] #clone#100(::String, ::Bool, ::Ptr{Void}, ::Nullable{Base.LibGit2.AbstractCredentials}, ::Function, ::String, ::String) at ./libgit2/libgit2.jl:562  
[4] (::Base.LibGit2.#kw##clone)(::Array{Any,1}, ::Base.LibGit2.#clone, ::String, ::String) at ./:0  
[5] (::Base.Pkg.Dir.##8#10{String,String})() at ./pkg/dir.jl:55  
[6] cd(::Base.Pkg.Dir.##8#10{String,String}, ::String) at ./file.jl:70  
[7] init(::String, ::String) at ./pkg/dir.jl:53  
[8] #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{String,N} where N) at ./pkg/dir.jl:28  
[9] add(::String) at ./pkg/pkg.jl:117

---

<div class="post-metadata">

**Author:** ![noahstier](https://avatars.discourse-cdn.com/v4/letter/n/9dc877/32.png) [@noahstier](https://discourse.julialang.org/u/noahstier)\
**Post date:** [August 6, 2018, 10:47pm UTC](https://discourse.julialang.org/t/pkg-update-failing-in-julia-0-6-4-on-ubuntu-16-04-behind-firewall/12957/3 "2018-08-06T22:47:11Z")

</div>

I figured it out. My certfile looks like this:

```julia
-----BEGIN CERTIFICATE-----
....
-----END CERTIFICATE-----

```

which means the cert file is already in PEM format, so no conversion necessary.

`julia -e "println(JULIA_HOME)"`  
gives me “/home/developer/julia/bin”  
And I did

```julia
cp /home/developer/julia/share/julia/cert.pem /home/developer/julia/share/julia/cert.pem-backup
cp mycertfile.crt /home/developer/julia/share/julia/cert.pem

```

and that was it, problem solved.

---

<div class="post-metadata">

**Author:** ![abhatia](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@abhatia](https://discourse.julialang.org/u/abhatia)\
**Post date:** [August 7, 2018, 1:48am UTC](https://discourse.julialang.org/t/pkg-update-failing-in-julia-0-6-4-on-ubuntu-16-04-behind-firewall/12957/4 "2018-08-07T01:48:10Z")

</div>

Thanks for sharing - worked perfectly for me too! Additional step I needed was to change permissions on Julia’s cert file first (was read only initially).
