Errors for Git / Pkg

There have been various reports of issues running package operations recently. They manifest as one of the following messages on running any package operations, such as Pkg.init or Pkg.add:

ERROR: GitError(Code:ERROR, Class:Net, SSL error: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version)


ERROR: GitError(Code:ECERTIFICATE, Class:OS, user cancelled certificate check: ) 

This is happening because GitHub stopped supporting TLS 1.0 in February:

The error occurs in Julia v0.5 on Linux and Julia v0.5 and v0.6 on Windows 7 and Windows Server 2012. MacOS systems are unaffected.

For Windows, the fix is to apply all reccomneded OS updates, and then apply the easy_fix executable from this URL:

For Linux 0.5, we announced dropping support some time ago, and thus there is no workaround. The only solution would have been to rebuild Julia with a newer OpenSSL. We recommend stopping support for 0.5 in your packages – Travis tests will no longer run on v0.5. Julia v0.6 is unaffected on Linux.


Im getting this with OSX

julia> Pkg.update()
INFO: Updating METADATA...
ERROR: METADATA cannot be updated. Resolve problems manually in /Users/amrods/.julia/v0.6/METADATA.
GitError(Code:ERROR, Class:OS, Failed to create locked file '/Users/amrods/.julia/v0.6/METADATA/.git/objects/pack/pack_git2_Jkidx.lock': Too many open files)
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.##4#7{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}}})() at ./pkg/dir.jl:36
cd(::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}}}, ::String) at ./file.jl:70
#cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N} where N) at ./pkg/dir.jl:36
update() at ./pkg/pkg.jl:228
eval(::Module, ::Any) at /Applications/
eval_user_input(::Any, ::Base.REPL.REPLBackend) at /Applications/
macro expansion at ./REPL.jl:97 [inlined]
(::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:73
 [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.##4#7{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}}})() at ./pkg/dir.jl:36
 [5] cd(::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}}}, ::String) at ./file.jl:70
 [6] #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N} where N) at ./pkg/dir.jl:36
 [7] update() at ./pkg/pkg.jl:228

Is it related?

This looks to me like a different issue. The clue is Too many open files, a quick search gets this

I started getting this error around the same time
in master branch
running in Cygwin under Windows 7 in Parallels on macOS

Any suggestions how to resolve?

JOSEFSACHS7548$ usr/bin/julia.exe
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation:
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.7.0-DEV.4399 (2018-02-27 04:42 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 00c82f034d (0 days old master)
|__/                   |  x86_64-w64-mingw32

julia> Pkg.status()
WARNING: Base.Pkg is deprecated, run `using Pkg` instead
 in module Main
[ Info: Initializing package repository C:\Users\sachs\.julia\v0.7
[ Info: Cloning METADATA from
ERROR: GitError(Code:ECERTIFICATE, Class:Net, unknown certificate check failure)
 [1] macro expansion at C:\cygwin64\home\sachs\src\julia-master\usr\share\julia\site\v0.7\LibGit2\src\error.jl:98 [inlined]
 [2] clone(::String, ::String, ::LibGit2.CloneOptions) at C:\cygwin64\home\sachs\src\julia-master\usr\share\julia\site\v0.7\LibGit2\src\repository.jl:423
 [3] macro expansion at C:\cygwin64\home\sachs\src\julia-master\usr\share\julia\site\v0.7\LibGit2\src\LibGit2.jl:541 [inlined]
 [4] macro expansion at .\gcutils.jl:82 [inlined]
 [5] #clone#136(::String, ::Bool, ::Ptr{Nothing}, ::LibGit2.CredentialPayload, ::Function, ::String, ::String) at C:\cygwin64\home\sachs\src\julia-master\usr\share\julia\site\v0.7\LibGit2\src\LibGit2.jl:531
 [6] (::getfield(LibGit2, Symbol("#kw##clone")))(::NamedTuple{(:branch,),Tuple{String}}, ::typeof(LibGit2.clone), ::String, ::String) at .\<missing>:0
 [7] (::getfield(Pkg.Dir, Symbol("##8#10")){String,String})() at C:\cygwin64\home\sachs\src\julia-master\usr\share\julia\site\v0.7\Pkg\src\dir.jl:55
 [8] cd(::getfield(Pkg.Dir, Symbol("##8#10")){String,String}, ::String) at .\file.jl:61
 [9] init(::String, ::String) at C:\cygwin64\home\sachs\src\julia-master\usr\share\julia\site\v0.7\Pkg\src\dir.jl:53
 [10] init at C:\cygwin64\home\sachs\src\julia-master\usr\share\julia\site\v0.7\Pkg\src\dir.jl:41 [inlined]
 [11] #cd#1(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Function, ::Base.TTY, ::Vararg{Base.TTY,N} where N) at C:\cygwin64\home\sachs\src\julia-master\usr\share\julia\site\v0.7\Pkg\src\dir.jl:28
 [12] cd at C:\cygwin64\home\sachs\src\julia-master\usr\share\julia\site\v0.7\Pkg\src\dir.jl:25 [inlined]
 [13] status(::Base.TTY) at C:\cygwin64\home\sachs\src\julia-master\usr\share\julia\site\v0.7\Pkg\src\Pkg.jl:154 (repeats 2 times)
 [14] top-level scope

Does the “quick-fix” linked in the first post not work?

On a Windows 7 machine with update KB3140245 easy_fix and after rebooting, I still see

julia> Pkg.update()
INFO: Updating METADATA...
ERROR: METADATA cannot be updated. Resolve problems manually in C:\Users\michele.zaffalon\.julia\v0.6\M
GitError(Code:ECERTIFICATE, Class:OS, user cancelled certificate check: )
macro expansion at .\libgit2\error.jl:99 [inlined]

on Julia 0.6.2.

I haven’t tried running the “quick-fix”, since the registry settings that its documentation says it will set are already present in the Windows Registry. Would it be expected that those setting would affect running under Cygwin?

In Microsoft’s notes on KB3140245, they state that if you have installed any language packs afterwards, you will have to reinstall the fix. There may well be other conditions that break it. In my case I had the Microsoft patch installed but was still hitting the certificate error. I ran the quick fix and everything is working again.

In my case, this was the last update and it did not work.

Same here: Installed that ‘fix’ but still, no package: ‘add’, ‘update’ … .
I’ve tried even to manually alter the 4 registry values as described in the Microsoft-Docs for that TLS Issue, nothing.
Current Setting that don’t work:
1.) HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings
-> SecureProtocols: 0x00000a80
2.) HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
-> SecureProtocols: 0x00000a80
3.) HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp
-> DefaultSecureProtocols: 0x00000a00
4.) HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp --> DefaultSecureProtocols: 0x00000a00
So i did this in JULIA:

julia> Pkg.update("Primes")
_INFO: Updating METADATA..._
_ERROR: METADATA cannot be updated. Resolve problems manually in C:\Users\ulti\.julia\v0.6\_
_GitError(Code:ECERTIFICATE, Class:OS, user cancelled certificate check: )_
**My System:** Win 7 Pro, SP1, + manually Installed SP2 (KB3125574)

I don’t know what I did exactly the first time, but when I tried the second time and clicked on the “Easy fix” link under Registry information, it worked.

I’ve used the ‘Easy Fix’ 4 or 5 times in the last couple of Days. Reboot, check, still get this Error.
The strange thing is: the different threads about this certificate-error seems to be not effecting Win 8 & Win 10 Systems, only Win 7 64Bit.
Related Stackoverflow:
I have even tried the other hexa codes for a mixed TLS-Standard:
1.: 0x00000200
2.: 0x00000800
3: 0x00000A00
Not matter what i set for this Key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings
it resets to 0x00000a80 after a Reboot, while the other 3 Keys stay the way i set them.

Finally got a fix.
The Easy fix on this page didn’t cut it.
The quick-fix didn’t patch the Webio.dll and the Winhttp.dll in the Windows-folders. So I went to the update-catalog and downloaded the proper file for my system:
Patched,restarted, works.

Is there a way to use the package manager on Windows 7 without applying the easy fix? It needs admin priviledges.


Indeed I’m wondering how the people without admin rights are solving this issue

Indeed, this is a very unfortunate issue for beginners, many will get this issue and stop using Julia. It is painful to install Julia and the first thing you get is an issue. Also, many of them don’t have admin rights and take time for the support to install this update. So the easy-fix is just a temporary fix, this should be fixed in new versions of Julia.

I’m having this issue with many companies that tries to use Julia with Windows 7
Also they cannot install the easy fix because it is no longer supported