What did you do before the bug happened? (Steps to reproduce your issue) I attempted to run `git -c core.sshCommand="ssh -i ~/.ssh/my_key" submodule update --init --recursive` in a repo with three submodules. The first was a public repository and the 2nd and 3rd required the private key that I specified as above. What did you expect to happen? (Expected behaviour) I expected all the submodules to be updated What happened instead? (Actual behaviour) The public repository was correctly checked out. The private ones were not checked out and I was asked for a user name for the repository. What's different between what you expected and what actually happened? I expected git to use the private key provided and not ask for user name. Anything else you want to add: If I did the following then the command worked as expected: EXPORT GIT_SSH_COMMAND="ssh -i ~/.ssh/my_key" submodule update --init --recursive Then all submodules update as expected. I assume this is because the `-c core.sshCommand` is not propagated to the underlying operations that perform the task of checking out the modules. I have the same behaviour on Linux and OSX. Please review the rest of the bug report below. You can delete any lines you don't wish to share. [System Info] git version: git version 2.34.1 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh uname: Linux 6.5.0-14-generic #14~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 20 18:15:30 UTC 2 x86_64 compiler info: gnuc: 11.4 libc info: glibc: 2.35 $SHELL (typically, interactive shell): /usr/bin/zsh [Enabled Hooks]