Pkg.update error, Base.LibGit2 test fails

question

#1

I got the following error when I tried to update the packages. I use Pkg.checkout(“CSV”) to get the latest version of CSV.jl. Today, I called Pkg.free(“CSV”). After doing this, I cannot update the packages. (Window 7, pro, 64bit, Julia0.6.2)

Pkg.update()


#2

The test of Base “libgit2” fails as follows. This error cannot be solved by reinstall Julia.

Base.runtests("libgit2")

The error is as following.

Test (Worker) | Time (s) | GC (s) | GC % | Alloc (MB) | RSS (MB)
files: Test Failed
  Expression: readstring(joinpath(test_repo, test_file)) == readstring(joinpath(
cache_repo, test_file))
   Evaluated: "SDO3sgZVZl\r\nqTmceWjX8C\r\nxVBnedPiS4\r\nzzzz\r\n" == "SDO3sgZVZ
l\nqTmceWjX8C\nxVBnedPiS4\nzzzz\n"
Stacktrace:
 [1] macro expansion at E:\Julia-0.6.2\share\julia\test\libgit2.jl:942 [inlined]

 [2] macro expansion at .\test.jl:860 [inlined]
 [3] macro expansion at E:\Julia-0.6.2\share\julia\test\libgit2.jl:941 [inlined]

 [4] macro expansion at .\test.jl:860 [inlined]
 [5] (::Test67Main_libgit2.##7#56)(::String) at E:\Julia-0.6.2\share\julia\test\
libgit2.jl:940
Worker 1 failed running test libgit2:
Some tests did not pass: 372 passed, 1 failed, 0 errored, 0 broken.libgit2: Test
 Failed
  Expression: readstring(joinpath(test_repo, test_file)) == readstring(joinpath(
cache_repo, test_file))
   Evaluated: "SDO3sgZVZl\r\nqTmceWjX8C\r\nxVBnedPiS4\r\nzzzz\r\n" == "SDO3sgZVZ
l\nqTmceWjX8C\nxVBnedPiS4\nzzzz\n"
Stacktrace:
 [1] record(::Base.Test.DefaultTestSet, ::Base.Test.Fail) at .\test.jl:568
 [2] (::##40#46)() at E:\Julia-0.6.2\share\julia\test\runtests.jl:160
 [3] cd(::##40#46, ::String) at .\file.jl:59
 [4] include_from_node1(::String) at .\loading.jl:576
 [5] include(::String) at .\sysimg.jl:14
 [6] process_options(::Base.JLOptions) at .\client.jl:305
 [7] _start() at .\client.jl:371

Test Summary: | Pass  Fail  Total
  Overall     |  372     1    373
    libgit2   |  372     1    373
    FAILURE
Error in testset libgit2:
Test Failed
  Expression: readstring(joinpath(test_repo, test_file)) == readstring(joinpath(
cache_repo, test_file))
   Evaluated: "SDO3sgZVZl\r\nqTmceWjX8C\r\nxVBnedPiS4\r\nzzzz\r\n" == "SDO3sgZVZ
l\nqTmceWjX8C\nxVBnedPiS4\nzzzz\n"
ERROR: LoadError: Test run finished with errors
while loading E:\Julia-0.6.2\share\julia\test\runtests.jl, in expression startin
g on line 29
ERROR: A test has failed. Please submit a bug report (https://github.com/JuliaLa
ng/julia/issues)
including error messages above and the output of versioninfo():
Julia Version 0.6.2
Commit d386e40c17* (2017-12-13 18:08 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, ivybridge)

Stacktrace:
 [1] runtests(::String, ::Int64) at .\interactiveutil.jl:691
 [2] runtests(::String) at .\interactiveutil.jl:680

#3

Please don’t use screenshots, they are difficult to read and copy. Use backticks.

This may be related to this issue. I would first try git from the command line and approve if it prompts for certificate validity.


#4

Thank you for advice. I have tried to find the answer on the website, but still cannot solve it.


#5

Thanks, @Tamas_Papp, It should be a new error. Other people also report this issue (Issue: 26167). Pkg works yesterday, just have the problem today. Maybe, It is related to the setting of the server holding the packages.


#6

I reinstalled Julia0.6.2. When I run Pkg.init() in the new installed Julia, I got the similar error as follows.

julia> Pkg.init()
INFO: Initializing package repository E:\package\v0.6
INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl
ERROR: GitError(Code:ECERTIFICATE, Class:OS, user cancelled certificate check: )

Stacktrace:
 [1] macro expansion at .\libgit2\error.jl:99 [inlined]
 [2] clone(::String, ::String, ::Base.LibGit2.CloneOptions) at .\libgit2\reposit
ory.jl:276
 [3] #clone#100(::String, ::Bool, ::Ptr{Void}, ::Nullable{Base.LibGit2.AbstractC
redentials}, ::Function, ::String, ::String) at .\libgit2\libgit2.jl:562
 [4] (::Base.LibGit2.#kw##clone)(::Array{Any,1}, ::Base.LibGit2.#clone, ::String
, ::String) at .\<missing>: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:59
 [7] init(::String, ::String) at .\pkg\dir.jl:53
 [8] init() at .\pkg\pkg.jl:85

#7

Github dropped support for old cipher suits last night. Apparently our windows MbedTLS builds ask for old versions. Julia on Linux works for 0.6, but fails on 0.5.

This does look like a critical issue (at least on windows – 0.5 is really really unsupported at this time for linux), and hopefully we’ll come up with a workaround as the day goes by.


#8

@avik Thanks for your explanation! Are there other ways to install the package of Julia? After I reinstalled Julia, I cannot install any package. I changed most of my data processing for the work to Julia now. Currently, I cannot do the work.


#9

Sorry, only thing I can say right now is use Linux or Mac :(. Rest assured many people are looking at this now, as they wake up. Hopefully will have an update soon.


#10

@avik Really thanks for your help! I can change to Linux for the work. I spent the whole afternoon on this :sweat_smile:.


#11

So @staticfloat found this Windows registry setting that enables TLSv1.1, since on Windows LibGit2 uses WinHTTP as the default provider. We’ve verified that this does seem to work.

https://support.microsoft.com/en-us/help/3140245/update-to-enable-tls-1-1-and-tls-1-2-as-a-default-secure-protocols-in

Run the easy-fix tool that is available on that page (or make the registry entries manually)

Thanks to Elliot.

Regards

Avik


#12

@avik Thank you so much! It works well.


#13

Related: