git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [BUG] GIT_SSH_COMMAND is not being decomposed

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Apr 13, 2019, 20:39 UTC
Message-ID
<874l71fxmg.fsf@evledraar.gmail.com>
In-Reply-To
<000d01d4f237$5cf2dc10$16d89430$@nexbridge.com>
On Sat, Apr 13 2019, Randall S. Becker wrote:
Show 26 quoted lines
> I am encountering a problem on one of our NonStop platform variants where
> the GIT_SSH_COMMAND string is not being broken into constituent parts. This
> is causing SSH to not run properly. As background, SSH is not in a standard
> location and has non-standard required arguments. This also occurs with
> core.sshCommand. The situation is:
>
> git config --global core.sshCommand '/G/system/zssh/sshossz5 -Q'
>
> which correctly sets .gitconfig as:
>
> [core]
>         sshCommand = /G/system/zssh/sshossz5 -Q
>
> When git is run with GIT_TRACE=true GIT_PACKET_TRACE=true git fetch
>
> We get the partial trace:
> 14:19:56.027088 trace: built-in: git fetch
> 14:19:56.029895 trace: run_command: '/G/system/zssh/sshossz5 -Q' -G
> user@host
>
> The same trace on our systems that actually do work results in:
> 14:19:56.029895 trace: run_command: '/G/system/zssh/sshossz5' '-Q' -G
> user@host
>
> I need help resolving why this is happening (as in where to look and debug
> the situation).

This doesn't seem to be documented *explicitly* (except between the lines & inferred), but it's only supported to pass a *command* there, i.e. the path of the ssh binary. See the code around get_ssh_command() in connect.c. The whole env/config value we look up gets passed as one.

So if you need arguments you need to create a wrapper script and set ssh command to that script.

Previous: Randall S. BeckerNext: Randall S. Becker
Message 2 of 10 in “[BUG] GIT_SSH_COMMAND is not being decomposed”
  1. Randall S. BeckerApr 13, 2019
  2. Ævar Arnfjörð BjarmasonApr 13, 2019
  3. Randall S. BeckerApr 13, 2019
  4. SZEDER GáborApr 13, 2019
  5. Randall S. BeckerApr 14, 2019
  6. Randall S. BeckerApr 15, 2019
  7. Andreas SchwabApr 15, 2019
  8. Randall S. BeckerApr 15, 2019
  9. Junio C HamanoApr 16, 2019
  10. Johannes SixtApr 15, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.