# Git certificate errors

**URL:** <https://discourse.julialang.org/t/git-certificate-errors/9350>\
**Category:** General Usage\
**Created:** [February 26, 2018, 8:03pm UTC](https://discourse.julialang.org/t/git-certificate-errors/9350 "2018-02-26T20:03:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacobcvt12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jacobcvt12/32/2695_2.png) [@jacobcvt12](https://discourse.julialang.org/u/jacobcvt12)\
**Post date:** [February 26, 2018, 8:03pm UTC](https://discourse.julialang.org/t/git-certificate-errors/9350/1 "2018-02-26T20:03:58Z")

</div>

All of a sudden I’ve been having trouble installing packages. This began with an attempt of installing `Adapt`

```julia
ERROR: Cannot clone Adapt from https://github.com/MikeInnes/Adapt.jl.git. user cancelled certificate check:
prefetch(::String, ::String, ::Array{String,1}) at .\pkg\cache.jl:56
resolve(::Dict{String,Base.Pkg.Types.VersionSet}, ::Dict{String,Dict{VersionNumber,Base.Pkg.Types.Available}}, ::Dict{String,Tuple{VersionNumber,Bool}}, ::Dict{String,Base.Pkg.Types.Fixed}, ::Dict{String,VersionNumber}, ::Set{String}) at .\pkg\entry.jl:516
resolve(::Dict{String,Base.Pkg.Types.VersionSet}, ::Dict{String,Dict{VersionNumber,Base.Pkg.Types.Available}}, ::Dict{String,Tuple{VersionNumber,Bool}}, ::Dict{String,Base.Pkg.Types.Fixed}) at .\pkg\entry.jl:479
edit(::Function, ::String, ::Base.Pkg.Types.VersionSet, ::Vararg{Base.Pkg.Types.VersionSet,N} where N) at .\pkg\entry.jl:30
(::Base.Pkg.Entry.##1#3{String,Base.Pkg.Types.VersionSet})() at .\task.jl:335
Stacktrace:
 [1] sync_end() at .\task.jl:287
 [2] macro expansion at .\task.jl:303 [inlined]
 [3] add(::String, ::Base.Pkg.Types.VersionSet) at .\pkg\entry.jl:51
 [4] (::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}})() at .\pkg\dir.jl:36
 [5] cd(::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}}, ::String) at .\file.jl:59
 [6] #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{String,N} where N) at .\pkg\dir.jl:36
 [7] add(::String) at .\pkg\pkg.jl:117

```

Got a similar error with Gadfly

```julia
julia> Pkg.add("Gadfly")
INFO: Updating cache of Compose...
ERROR: GitError(Code:ECERTIFICATE, Class:OS, user cancelled certificate check: )
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
fetch(::Base.LibGit2.GitRepo) at .\libgit2\libgit2.jl:304
prefetch(::String, ::String, ::Array{String,1}) at .\pkg\cache.jl:64
resolve(::Dict{String,Base.Pkg.Types.VersionSet}, ::Dict{String,Dict{VersionNumber,Base.Pkg.Types.Available}}, ::Dict{String,Tuple{VersionNumber,Bool}}, ::Dict{String,Base.Pkg.Types.Fixed}, ::Dict{String,VersionNumber}, ::Set{String}) at .\pkg\entry.jl:516
resolve(::Dict{String,Base.Pkg.Types.VersionSet}, ::Dict{String,Dict{VersionNumber,Base.Pkg.Types.Available}}, ::Dict{String,Tuple{VersionNumber,Bool}}, ::Dict{String,Base.Pkg.Types.Fixed}) at .\pkg\entry.jl:479
edit(::Function, ::String, ::Base.Pkg.Types.VersionSet, ::Vararg{Base.Pkg.Types.VersionSet,N} where N) at .\pkg\entry.jl:30
(::Base.Pkg.Entry.##1#3{String,Base.Pkg.Types.VersionSet})() at .\task.jl:335
Stacktrace:
 [1] sync_end() at .\task.jl:287
 [2] macro expansion at .\task.jl:303 [inlined]
 [3] add(::String, ::Base.Pkg.Types.VersionSet) at .\pkg\entry.jl:51
 [4] (::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}})() at .\pkg\dir.jl:36
 [5] cd(::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}}, ::String) at .\file.jl:59
 [6] #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{String,N} where N) at .\pkg\dir.jl:36
 [7] add(::String) at .\pkg\pkg.jl:117

```

Weirdly, YAML installed fine, but then I got another “user cancelled certificate check” when adding `StatsModels`.

May be related to [this](https://discourse.julialang.org/t/git-ssl-errors-while-installing-packages/9347)?

---

<div class="post-metadata">

**Author:** ![simonbyrne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simonbyrne/32/19_2.png) [@simonbyrne](https://discourse.julialang.org/u/simonbyrne)\
**Post date:** [February 26, 2018, 8:13pm UTC](https://discourse.julialang.org/t/git-certificate-errors/9350/2 "2018-02-26T20:13:47Z")

</div>

Yes, the easiest way to fix it for now is to use the “Easy Fix” from

> **[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.

---

<div class="post-metadata">

**Author:** ![jacobcvt12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jacobcvt12/32/2695_2.png) [@jacobcvt12](https://discourse.julialang.org/u/jacobcvt12)\
**Post date:** [February 26, 2018, 8:34pm UTC](https://discourse.julialang.org/t/git-certificate-errors/9350/3 "2018-02-26T20:34:58Z")

</div>

Thanks @simonbyrne! i’ll give that a try

---

<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 26, 2018, 8:45pm UTC](https://discourse.julialang.org/t/git-certificate-errors/9350/4 "2018-02-26T20:45:15Z")

</div>

The “Easy Fix” worked for me. I had installed the Windows patch earlier but must have installed a language pack afterwards which breaks that fix! I was afraid that our internal IT folks had done something that didn’t allow Pkg.update() to work - fortunately not the case.

---

<div class="post-metadata">

**Author:** ![jacobcvt12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jacobcvt12/32/2695_2.png) [@jacobcvt12](https://discourse.julialang.org/u/jacobcvt12)\
**Post date:** [February 28, 2018, 6:10pm UTC](https://discourse.julialang.org/t/git-certificate-errors/9350/5 "2018-02-28T18:10:03Z")

</div>

According to IT at my company, this update is already installed on my computer. I noticed that I’m able to `git clone X` from the command line without any error. If that’s the case, is it possible that the issue is separate from this update?
