# Errors for Git / Pkg

**URL:** <https://discourse.julialang.org/t/errors-for-git-pkg/9351>\
**Category:** General Usage\
**Created:** [February 26, 2018, 9:28pm UTC](https://discourse.julialang.org/t/errors-for-git-pkg/9351 "2018-02-26T21:28:38Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![avik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/avik/32/17_2.png) [@avik](https://discourse.julialang.org/u/avik)\
**Post date:** [February 26, 2018, 9:28pm UTC](https://discourse.julialang.org/t/errors-for-git-pkg/9351/1 "2018-02-26T21:28:38Z")

</div>

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`:

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

```

or

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

```

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

> **[Weak cryptographic standards removal notice](https://githubengineering.com/crypto-removal-notice/)**
>
> Last year we announced the deprecation of several weak cryptographic standards. Then we provided a status update toward the end of last year outlining some changes we’d made to make the transition easier for clients. We quickly approached the...

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:

> **[Update to enable TLS 1.1 and TLS 1.2 as default secure protocols in WinHTTP...](https://support.microsoft.com/en-us/topic/update-to-enable-tls-1-1-and-tls-1-2-as-default-secure-protocols-in-winhttp-in-windows-c4bd73d2-31d7-761e-0178-11268bb10392)**
>
> Describes an update that adds TLS 1.1 and TLS 1.2 to default security protocols in Windows Server 2012, Windows 7 SP1, and Windows Server 2008 R2 SP1.

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.

---

<div class="post-metadata">

**Author:** ![avik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/avik/32/17_2.png) [@avik](https://discourse.julialang.org/u/avik)\
**Post date:** [February 26, 2018, 9:29pm UTC](https://discourse.julialang.org/t/errors-for-git-pkg/9351/2 "2018-02-26T21:29:42Z")

</div>



---

<div class="post-metadata">

**Author:** ![amrods](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amrods/32/2543_2.png) [@amrods](https://discourse.julialang.org/u/amrods)\
**Post date:** [February 27, 2018, 7:45am UTC](https://discourse.julialang.org/t/errors-for-git-pkg/9351/3 "2018-02-27T07:45:10Z")

</div>

Im getting this with OSX

```julia
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/Julia-0.6.app/Contents/Resources/julia/lib/julia/sys.dylib:?
eval_user_input(::Any, ::Base.REPL.REPLBackend) at /Applications/Julia-0.6.app/Contents/Resources/julia/lib/julia/sys.dylib:?
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.##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?

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [February 27, 2018, 9:04am UTC](https://discourse.julialang.org/t/errors-for-git-pkg/9351/4 "2018-02-27T09:04:39Z")

</div>

This looks to me like a different issue. The clue is `Too many open files`, a quick search gets this [macos - Os x terminal, ssh , and too many open files - Stack Overflow](https://stackoverflow.com/questions/10095796/os-x-terminal-ssh-and-too-many-open-files).

---

<div class="post-metadata">

**Author:** ![josefsachs](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@josefsachs](https://discourse.julialang.org/u/josefsachs)\
**Post date:** [February 27, 2018, 9:35am UTC](https://discourse.julialang.org/t/errors-for-git-pkg/9351/5 "2018-02-27T09:35:20Z")

</div>

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?

```julia
JOSEFSACHS7548$ usr/bin/julia.exe
               _
   _ _ _(_)_ | A fresh approach to technical computing
  (_) | (_) (_) | Documentation: https://docs.julialang.org
   _ _ _| |_ __ _ | 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 https://github.com/JuliaLang/METADATA.jl
ERROR: GitError(Code:ECERTIFICATE, Class:Net, unknown certificate check failure)
Stacktrace:
 [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

```

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [February 27, 2018, 9:49am UTC](https://discourse.julialang.org/t/errors-for-git-pkg/9351/6 "2018-02-27T09:49:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mzaffalon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mzaffalon/32/214168_2.png) [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Post date:** [February 27, 2018, 9:52am UTC](https://discourse.julialang.org/t/errors-for-git-pkg/9351/7 "2018-02-27T09:52:12Z")

</div>

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

```julia
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.

---

<div class="post-metadata">

**Author:** ![josefsachs](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@josefsachs](https://discourse.julialang.org/u/josefsachs)\
**Post date:** [February 27, 2018, 9:52am UTC](https://discourse.julialang.org/t/errors-for-git-pkg/9351/8 "2018-02-27T09:52:41Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![js135005](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/js135005/32/8219_2.png) [@js135005](https://discourse.julialang.org/u/js135005)\
**Post date:** [February 27, 2018, 2:04pm UTC](https://discourse.julialang.org/t/errors-for-git-pkg/9351/9 "2018-02-27T14:04:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mzaffalon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mzaffalon/32/214168_2.png) [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Post date:** [February 27, 2018, 3:24pm UTC](https://discourse.julialang.org/t/errors-for-git-pkg/9351/10 "2018-02-27T15:24:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ultima](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ultima/32/4244_2.png) [@Ultima](https://discourse.julialang.org/u/Ultima)\
**Post date:** [March 2, 2018, 2:29pm UTC](https://discourse.julialang.org/t/errors-for-git-pkg/9351/11 "2018-03-02T14:29:03Z")

</div>

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

```

---

<div class="post-metadata">

**Author:** ![mzaffalon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mzaffalon/32/214168_2.png) [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Post date:** [March 2, 2018, 4:38pm UTC](https://discourse.julialang.org/t/errors-for-git-pkg/9351/12 "2018-03-02T16:38:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ultima](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ultima/32/4244_2.png) [@Ultima](https://discourse.julialang.org/u/Ultima)\
**Post date:** [March 2, 2018, 5:14pm UTC](https://discourse.julialang.org/t/errors-for-git-pkg/9351/13 "2018-03-02T17:14:45Z")

</div>

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: [Julia git error - Stack Overflow](https://stackoverflow.com/questions/48950748/julia-git-error)  
Github: [https://github.com/JuliaLang/julia/issues/26167](https://github.com/JuliaLang/julia/issues/26167)  
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.

---

<div class="post-metadata">

**Author:** ![Ultima](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ultima/32/4244_2.png) [@Ultima](https://discourse.julialang.org/u/Ultima)\
**Post date:** [March 13, 2018, 2:52pm UTC](https://discourse.julialang.org/t/errors-for-git-pkg/9351/14 "2018-03-13T14:52:56Z")

</div>

Finally got a fix.  
The Easy fix on this page didn’t cut it. [Update to enable TLS 1.1 and TLS 1.2 as default secure protocols in WinHTTP in Windows](https://support.microsoft.com/en-us/help/3140245/update-to-enable-tls-1-1-and-tls-1-2-as-a-default-secure-protocols-in)  
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: [Microsoft Update Catalog](https://www.catalog.update.microsoft.com/search.aspx?q=kb3140245)  
Patched,restarted, works.

---

<div class="post-metadata">

**Author:** ![gsmafra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gsmafra/32/3849_2.png) [@gsmafra](https://discourse.julialang.org/u/gsmafra)\
**Post date:** [March 29, 2018, 5:46pm UTC](https://discourse.julialang.org/t/errors-for-git-pkg/9351/15 "2018-03-29T17:46:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![flxho](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/flxho/32/3922_2.png) [@flxho](https://discourse.julialang.org/u/flxho)\
**Post date:** [April 11, 2018, 12:08pm UTC](https://discourse.julialang.org/t/errors-for-git-pkg/9351/16 "2018-04-11T12:08:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Thuener](https://avatars.discourse-cdn.com/v4/letter/t/7ba0ec/32.png) [@Thuener](https://discourse.julialang.org/u/Thuener)\
**Post date:** [September 14, 2018, 3:51pm UTC](https://discourse.julialang.org/t/errors-for-git-pkg/9351/17 "2018-09-14T15:51:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Thuener](https://avatars.discourse-cdn.com/v4/letter/t/7ba0ec/32.png) [@Thuener](https://discourse.julialang.org/u/Thuener)\
**Post date:** [October 10, 2018, 1:09pm UTC](https://discourse.julialang.org/t/errors-for-git-pkg/9351/18 "2018-10-10T13:09:19Z")

</div>

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 [Microsoft Easy Fix solutions have been discontinued](https://support.microsoft.com/en-us/help/2970908/how-to-use-microsoft-easy-fix-solutions)
