Windows nanoserver github portable (ssh auth) fatal: Could not read from remote repository

Update on this. I believe that my guess is correct; GitHub ssh does not work in Nano. I moved over to using OpenSSH 9.2.0.0p1-Beta and forced git to use OpenSSH as it’s client.

RUN git config --global core.sshcommand 'C:/AdminScripts/OpenSSH/ssh.exe'

We also ran into an issue where when the git clone was running it would complain about the github.com address not being trusted so we had to add in the following statement to the ssh config file.

Host *
        StrictHostKeyChecking no

After that was done I ran into a further issue that the git clone command was still returning a non-zero value and with some trickery and help from a co-worker we did the following:

RUN $result = (git clone --recursive --depth 1 --no-tags --single-branch --config advice.detachedHead=false --config core.bare=true git@github.com-repo1:<company>/<repo>.git C:\AdminScripts\repo1);$error.clear();return 0