{"thread":{"id":"60833","subject":"Git submodule ssh command recursion bug","startedAt":"2024-02-02T09:59:49Z","lastAt":"2024-02-02T09:59:49Z","messageCount":1,"participants":["David Weber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"487798","messageId":"FB27DE07-1C5A-4E2F-8BE6-8AC958365C9B@veryflatcat.com","threadId":"60833","inReplyTo":null,"subject":"Git submodule ssh command recursion bug","fromName":"David Weber","fromEmail":"dave@veryflatcat.com","sentAt":"2024-02-02T09:59:33Z","receivedAt":"2024-02-02T09:59:49Z","isPatch":false,"sender":{"key":"dave@veryflatcat.com","avatar":null},"body":"What did you do before the bug happened? (Steps to reproduce your issue)\nI attempted to run `git -c core.sshCommand=\"ssh -i ~/.ssh/my_key\" submodule update --init --recursive` in\na repo with three submodules. The first was a public repository and the 2nd and 3rd required the private\nkey that I specified as above.\n\nWhat did you expect to happen? (Expected behaviour)\nI expected all the submodules to be updated\n\nWhat happened instead? (Actual behaviour)\nThe public repository was correctly checked out. The private ones were not checked out and I was asked for\na user name for the repository.\n\nWhat's different between what you expected and what actually happened?\nI expected git to use the private key provided and not ask for user name.\n\nAnything else you want to add:\nIf I did the following then the command worked as expected:\n\n  EXPORT GIT_SSH_COMMAND=\"ssh -i ~/.ssh/my_key\"\n  submodule update --init --recursive\n\nThen all submodules update as expected. I assume this is because the `-c  core.sshCommand` is not propagated\nto the underlying operations that perform the task of checking out the modules.\n\nI have the same behaviour on Linux and OSX.\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.34.1\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Linux 6.5.0-14-generic #14~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 20 18:15:30 UTC 2 x86_64\ncompiler info: gnuc: 11.4\nlibc info: glibc: 2.35\n$SHELL (typically, interactive shell): /usr/bin/zsh\n\n\n[Enabled Hooks]"}]}