Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Honoring GIT_SSH_COMMAND #1377

Closed
theherk opened this issue Oct 4, 2022 · 5 comments
Closed

Not Honoring GIT_SSH_COMMAND #1377

theherk opened this issue Oct 4, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@theherk
Copy link

theherk commented Oct 4, 2022

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 theherk added the bug Something isn't working label Oct 4, 2022
@extrawurst
Copy link
Collaborator

Gitui currently does not use the git shell at all

@theherk
Copy link
Author

theherk commented Oct 4, 2022

@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.

@extrawurst
Copy link
Collaborator

maybe related: libgit2/libgit2#6399

@extrawurst
Copy link
Collaborator

libgit2/libgit2#6617 - soon supported by upstream

@extrawurst
Copy link
Collaborator

support for sshCommand landed in: libgit2/libgit2@019cf6c#diff-e0cbc1fc125de05985d9205c2fb5091b94f7f23c298e9b37cd198668d4b3031d it is not available on our upstream yet, we have a tracking issue for this now: #2096

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants