# SSH host verification errors when \`dev\`ing a package from GitHub Enterprise with Julia 1.6.1

**URL:** <https://discourse.julialang.org/t/ssh-host-verification-errors-when-dev-ing-a-package-from-github-enterprise-with-julia-1-6-1/63816>\
**Category:** New to Julia\
**Tags:** pkg, github, ssh\
**Created:** [June 30, 2021, 10:46am UTC](https://discourse.julialang.org/t/ssh-host-verification-errors-when-dev-ing-a-package-from-github-enterprise-with-julia-1-6-1/63816 "2021-06-30T10:46:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanielIngraham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielingraham/32/13055_2.png) [@DanielIngraham](https://discourse.julialang.org/u/DanielIngraham)\
**Post date:** [June 30, 2021, 10:46am UTC](https://discourse.julialang.org/t/ssh-host-verification-errors-when-dev-ing-a-package-from-github-enterprise-with-julia-1-6-1/63816/1 "2021-06-30T10:46:10Z")

</div>

I’m able to `dev` a package from my workplace’s GitHub Enterprise with Julia 1.5.4:

```julia
$ julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.5.4 (2021-03-11)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

(@v1.5) pkg> activate .
 Activating new environment at `~/projects/julia_issues_and_tips/pkg_developer_troubles/1.5.4-no_prefix/Project.toml`

(1.5.4-no_prefix) pkg> dev --local git@developer.foobar.gov:dingraha/MyTestPackage.git
    Cloning git-repo `git@developer.foobar.gov:dingraha/MyTestPackage.git`
Private key location for 'git@developer.foobar.gov' [/home/dingraha/.ssh/id_rsa]:
Passphrase for /home/dingraha/.ssh/id_rsa:
  Resolving package versions...
Updating `~/projects/julia_issues_and_tips/pkg_developer_troubles/1.5.4-no_prefix/Project.toml`
  [e51a849f] + MyTestPackage v0.1.0 `dev/MyTestPackage`
Updating `~/projects/julia_issues_and_tips/pkg_developer_troubles/1.5.4-no_prefix/Manifest.toml`
  [e51a849f] + MyTestPackage v0.1.0 `dev/MyTestPackage`

(1.5.4-no_prefix) pkg>

```

But doing the same thing from 1.6.1 fails with a SSH host verification error:

```julia
$ julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.6.1 (2021-04-23)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

(@v1.6) pkg> activate .
  Activating new environment at `~/projects/julia_issues_and_tips/pkg_developer_troubles/1.6.1-no_prefix/Project.toml`

(1.6.1-no_prefix) pkg> dev --local git@developer.foobar.gov:dingraha/MyTestPackage.git
     Cloning git-repo `git@developer.foobar.gov:dingraha/MyTestPackage.git`
SSH host verification: the identity of the server `developer.foobar.gov: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.
ERROR: failed to clone from git@developer.foobar.gov:dingraha/MyTestPackage.git, error: GitError(Code:ERROR, Class:Net, user cancelled hostkey check)

(1.6.1-no_prefix) pkg>

```

I can manually clone the repository from the shell without a problem:

```julia
$ julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.6.1 (2021-04-23)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

shell> ls

shell> git clone git@developer.foobar.gov:dingraha/MyTestPackage.git
Cloning into 'MyTestPackage'...
Warning: Permanently added the ECDSA host key for IP address 'xxx.xxx.xxx.xxx' to the list of known hosts.
Enter passphrase for key '/home/dingraha/.ssh/id_rsa':
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 5 (delta 0), reused 5 (delta 0), pack-reused 0
Receiving objects: 100% (5/5), 547 bytes | 0 bytes/s, done.

shell>

```

Any ideas on how to fix this?

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [June 30, 2021, 11:59am UTC](https://discourse.julialang.org/t/ssh-host-verification-errors-when-dev-ing-a-package-from-github-enterprise-with-julia-1-6-1/63816/2 "2021-06-30T11:59:09Z")

</div>

Some pointers: [Pkg.jl#2485](https://github.com/JuliaLang/Pkg.jl/issues/2485), [Pkg.jl#2428](https://github.com/JuliaLang/Pkg.jl/issues/2428), [Pkg.jl#2334](https://github.com/JuliaLang/Pkg.jl/issues/2334), [Pkg.jl#2333](https://github.com/JuliaLang/Pkg.jl/issues/2333) so I think you can fix this by adjusting the `known_hosts` file.

You should also be able to opt out entirely from host verification by setting `JULIA_NO_VERIFY_HOST` (or just `JULIA_SSH_NO_VERIFY_HOSTS`), see [NetworkOptions.jl](https://github.com/JuliaLang/NetworkOptions.jl#verify_host).

---

<div class="post-metadata">

**Author:** ![DanielIngraham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielingraham/32/13055_2.png) [@DanielIngraham](https://discourse.julialang.org/u/DanielIngraham)\
**Post date:** [June 30, 2021, 2:07pm UTC](https://discourse.julialang.org/t/ssh-host-verification-errors-when-dev-ing-a-package-from-github-enterprise-with-julia-1-6-1/63816/3 "2021-06-30T14:07:21Z")

</div>

Excellent, thanks for the links.

- Adding the host (`developer.foobar.gov` in my example) to `JULIA_SSH_NO_VERIFY_HOSTS` worked fine as a workaround.
- I tried moving my `~/.ssh/known_hosts` file away, then ran `dev --local` again and got this error message:

```julia
 (1.6.1-no_prefix) pkg> dev --local git@developer.foobar.gov:dingraha/MyTestPackage.git
     Cloning git-repo `git@developer.foobar.gov:dingraha/MyTestPackage.git`
SSH host verification: the server `developer.foobar.gov:22` is not a known host. Please run `ssh-keyscan developer.foobar.gov:22 >> /home/dingraha/.ssh/known_hosts` in order to add the server to your known hosts file and then try again.
ERROR: failed to clone from git@developer.foobar.gov:dingraha/MyTestPackage.git, error: GitError(Code:ERROR, Class:Net, user cancelled hostkey check)

```

Then I ran `ssh-keyscan developer.foobar.gov >> /home/dingraha/.ssh/known_hosts`, which appears to fix the issue.

Thanks again!

Daniel

---

<div class="post-metadata">

**Author:** ![Xing\_Shi\_Cai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xing_shi_cai/32/14128_2.png) [@Xing\_Shi\_Cai](https://discourse.julialang.org/u/Xing_Shi_Cai)\
**Post date:** [October 13, 2022, 1:50pm UTC](https://discourse.julialang.org/t/ssh-host-verification-errors-when-dev-ing-a-package-from-github-enterprise-with-julia-1-6-1/63816/4 "2022-10-13T13:50:27Z")

</div>

> [@DanielIngraham](#):
>
> Then I ran `ssh-keyscan developer.foobar.gov >> /home/dingraha/.ssh/known_hosts`, which appears to fix the issue.

I had this problem with `github.com`. This workaround solved it.

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [October 13, 2022, 2:05pm UTC](https://discourse.julialang.org/t/ssh-host-verification-errors-when-dev-ing-a-package-from-github-enterprise-with-julia-1-6-1/63816/5 "2022-10-13T14:05:46Z")

</div>

eh, are you being MITM attacked by the government? because that’s why a different host would show up between you and github
