# Julia repl is ignoring my ssh config file

**URL:** <https://discourse.julialang.org/t/julia-repl-is-ignoring-my-ssh-config-file/65287>\
**Category:** New to Julia\
**Tags:** github, ssh\
**Created:** [July 26, 2021, 4:06am UTC](https://discourse.julialang.org/t/julia-repl-is-ignoring-my-ssh-config-file/65287 "2021-07-26T04:06:18Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![banksiaboy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/banksiaboy/32/27032_2.png) [@banksiaboy](https://discourse.julialang.org/u/banksiaboy)\
**Post date:** [July 26, 2021, 4:06am UTC](https://discourse.julialang.org/t/julia-repl-is-ignoring-my-ssh-config-file/65287/1 "2021-07-26T04:06:18Z")

</div>

If i try `develop --local git@github.com<>.git`, the julia repl ignores my carefully crafted ssh config file and asks for my private key location. My private keys are not stored locally and are accessed through a 2fa agent - which works with everything else in my quite diverse ecosystem.

Is there anyway to get julia too look for keys via .ssh/config?

---

<div class="post-metadata">

**Author:** ![aramirezreyes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aramirezreyes/32/42573_2.png) [@aramirezreyes](https://discourse.julialang.org/u/aramirezreyes)\
**Post date:** [July 27, 2021, 6:49pm UTC](https://discourse.julialang.org/t/julia-repl-is-ignoring-my-ssh-config-file/65287/2 "2021-07-27T18:49:50Z")

</div>

I think there is no current way of making it honor the `.config`. Most people just clone the repo via the git command line program outside of the REPL and then `dev` the local repo inside it.

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [July 27, 2021, 7:48pm UTC](https://discourse.julialang.org/t/julia-repl-is-ignoring-my-ssh-config-file/65287/3 "2021-07-27T19:48:57Z")

</div>

> [@banksiaboy](#):
>
> Is there anyway to get julia too look for keys via .ssh/config?

The question is not about Julia but what Julia uses to run operations, which until Julia v1.6 is [libgit2](https://github.com/libgit2/libgit2). No, libgit2 doesn’t support ssh config: [Support ~/.ssh/id\_rsa or ~/.ssh/config · Issue #5640 · libgit2/libgit2 · GitHub](https://github.com/libgit2/libgit2/issues/5640). However, I believe that starting from Julia v1.7 command-line git should be used to run git operations, when available

---

<div class="post-metadata">

**Author:** ![simeonschaub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simeonschaub/32/216566_2.png) [@simeonschaub](https://discourse.julialang.org/u/simeonschaub)\
**Post date:** [July 27, 2021, 8:17pm UTC](https://discourse.julialang.org/t/julia-repl-is-ignoring-my-ssh-config-file/65287/4 "2021-07-27T20:17:22Z")

</div>

> [@giordano](#):
>
> However, I believe that starting from Julia v1.7 command-line git should be used to run git operations, when available

I believe by default Julia will still use its own libgit2, but in 1.7 you can set the environment variable `JULIA_PKG_USE_CLI_GIT=true` to force it to use your system git instead.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [August 30, 2021, 11:01pm UTC](https://discourse.julialang.org/t/julia-repl-is-ignoring-my-ssh-config-file/65287/5 "2021-08-30T23:01:49Z")

</div>

> [@simeonschaub](#):
>
> but in 1.7 you can set the environment variable `JULIA_PKG_USE_CLI_GIT=true` to force it to use your system git instead.

Simeon, would you know if there is any documentation regarding “github ssh authentication” in Julia 1.7, in particular for Windows users?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![simeonschaub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simeonschaub/32/216566_2.png) [@simeonschaub](https://discourse.julialang.org/u/simeonschaub)\
**Post date:** [August 31, 2021, 11:01am UTC](https://discourse.julialang.org/t/julia-repl-is-ignoring-my-ssh-config-file/65287/6 "2021-08-31T11:01:18Z")

</div>

I have no ideas for Windows in particular, but [Connecting to GitHub with SSH - GitHub Docs](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh) probably has most of the information you need.

---

<div class="post-metadata">

**Author:** ![dmoored4](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dmoored4/32/18311_2.png) [@dmoored4](https://discourse.julialang.org/u/dmoored4)\
**Post date:** [June 14, 2022, 5:45pm UTC](https://discourse.julialang.org/t/julia-repl-is-ignoring-my-ssh-config-file/65287/7 "2022-06-14T17:45:20Z")

</div>

Edited to fix typos…  
Sorry to bump an old one, but maybe this will help some people. This worked for me, not sure if it’s the best solution or will work for everybody.

The environment variable is set in Julia with:

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

```

If you want this behavior always (which I think many do), then you need to put this in a `startup.jl` file. If you don’t have one of those already, it goes here:

`C:\\Users\\you\\.julia\\config\\startup.jl`

and just put that one line in the file.

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [June 14, 2022, 6:00pm UTC](https://discourse.julialang.org/t/julia-repl-is-ignoring-my-ssh-config-file/65287/8 "2022-06-14T18:00:01Z")

</div>

> [@dmoored4](#):
>
> The environment variable is set in Julia with:
> 
> ```julia
> julia> ENV["JULIA_USE_CLI"]=true
> 
> ```

I don’t think that is the correct name.

---

<div class="post-metadata">

**Author:** ![dmoored4](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dmoored4/32/18311_2.png) [@dmoored4](https://discourse.julialang.org/u/dmoored4)\
**Post date:** [June 14, 2022, 7:23pm UTC](https://discourse.julialang.org/t/julia-repl-is-ignoring-my-ssh-config-file/65287/9 "2022-06-14T19:23:31Z")

</div>

sorry, thanks for the correction!

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [July 28, 2022, 1:33pm UTC](https://discourse.julialang.org/t/julia-repl-is-ignoring-my-ssh-config-file/65287/10 "2022-07-28T13:33:50Z")

</div>

> [@dmoored4](#):
>
> `C:\\Users\\you\\.julia\\config\\starup.jl`

You misspelled `startup.jl`

`C:\\Users\\you\\.julia\\config\\startup.jl`
