# Version of Libgit2 on Windows different from from Linux?

**URL:** <https://discourse.julialang.org/t/version-of-libgit2-on-windows-different-from-from-linux/90695>\
**Category:** General Usage\
**Tags:** pkg\
**Created:** [November 23, 2022, 9:56am UTC](https://discourse.julialang.org/t/version-of-libgit2-on-windows-different-from-from-linux/90695 "2022-11-23T09:56:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hellemo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hellemo/32/324_2.png) [@hellemo](https://discourse.julialang.org/u/hellemo)\
**Post date:** [November 23, 2022, 9:56am UTC](https://discourse.julialang.org/t/version-of-libgit2-on-windows-different-from-from-linux/90695/1 "2022-11-23T09:56:51Z")

</div>

We have some issues accessing packages hosted on private repos at GitHub. Long story short, using v1.8.3 on windows and ssh-agent with the appropriate key added to known\_hosts, and get the error:

```julia
SSH host verification: the identity of the server `github.com:22` does not match its known hosts record. Someone could be trying to man-in-the-middle your connection. It is also possible that the server has changed its key, in which case you should check with the server administrator and if they confirm that the key has been changed, update your known hosts file.

```

(steps to reproduce is to add a private repo at GitHub in Pkg)

A workaround is to use the git client by setting

```julia
ENV["JULIA_PKG_USE_CLI_GIT"]=true

```

but that is quite annoying, and garbles the status prints.

On Linux on the other hand (also v1.8.3), adding the private repo works without issues. Does this mean that the windows release uses a different version of libgit2? Or what else could be going on here?

---

<div class="post-metadata">

**Author:** ![rsrock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rsrock/32/115_2.png) [@rsrock](https://discourse.julialang.org/u/rsrock)\
**Post date:** [December 10, 2022, 12:13am UTC](https://discourse.julialang.org/t/version-of-libgit2-on-windows-different-from-from-linux/90695/2 "2022-12-10T00:13:42Z")

</div>

I just noticed this myself, on 1.8.3 and an M1 mac with a private repo. The github host key is correct in my known\_hosts and I can `ssh -T git@github.com` just fine. The env setting above also fixes the problem.

[edit] More info at [known\_hosts SSH verification failing for gitlab.com · Issue #40297 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/40297)
