gitui icon indicating copy to clipboard operation
gitui copied to clipboard

Not Honoring GIT_SSH_COMMAND

Open theherk opened this issue 3 years ago • 4 comments

I use an SSH proxy to reach a private git host. This is done by first authenticating then using a tunnel for the connection. This tunnel is routed using GIT_SSH_COMMAND. I have it set using both environment:

export GIT_SSH_COMMAND='ssh -F ~/.ssh/gproxy.cfg'

and git config:

[core]
    sshCommand = ssh -F ~/.ssh/gproxy.cfg

since not everything honors the git config option.

This works well. I mostly use magit, but from the command line I can git pull. However, in gitui when I press f (only in repositories using this tunnel), I get connection timeout. So it seems this is not honoring the GIT_SSH_COMMAND.

To Reproduce

  1. Create an ssh tunnel to your git host.
  2. Ensure git pull fails.
  3. Export GIT_SSH_COMMAND to the tunnel.
  4. Ensure git pull succeeds.
  5. Launch gitui.
  6. Pull with f.

Screenshots

Screenshot 2022-10-04 at 09 23 29

Context

  • OS/Distro + Version: macOS Monterey 12.6
  • GitUI Version: 0.21.0
  • Rust version: rustc 1.64.0-nightly (9067d5277 2022-07-28)

theherk avatar Oct 04 '22 07:10 theherk

Gitui currently does not use the git shell at all

extrawurst avatar Oct 04 '22 12:10 extrawurst

@extrawurst: That's good, but it could still support this component of configuration, right? Or is that not the case? I haven't done much with the git2 or ssh crates.

theherk avatar Oct 04 '22 12:10 theherk

maybe related: https://github.com/libgit2/libgit2/pull/6399

extrawurst avatar Feb 20 '23 16:02 extrawurst

https://github.com/libgit2/libgit2/pull/6617 - soon supported by upstream

extrawurst avatar Aug 31 '23 08:08 extrawurst

support for sshCommand landed in: https://github.com/libgit2/libgit2/commit/019cf6c24f6d150a11b7b4f150b3b6843b47e3c0#diff-e0cbc1fc125de05985d9205c2fb5091b94f7f23c298e9b37cd198668d4b3031d it is not available on our upstream yet, we have a tracking issue for this now: #2096

extrawurst avatar Feb 23 '24 14:02 extrawurst