These parts have been tested and are working in Windows Core Container and on my actual system.
On the Nano based container I place my SSH Keys into C:\AdminScripts\IdentityFiles and in the C:\Users\ContainerUser.ssh\config file I have entries that look like this:
Host github.com-repo1
Hostname github.com
User <MyUser>
IdentityFile=C:\Users\ContainerUser\.ssh\id_ed25519_repo1
I issue the git clone command of
git clone --recursive --depth 1 --no-tags --single-branch --config advice.detachedHead=false --config core.bare=true git@github.com-repo1:<Company>/<repo1>.git C:\AdminScripts\<repo1>
getting the following error back:
Cloning into ‘C:\AdminScripts\repo1’…
fatal: Could not read from remote repository.Please make sure you have the correct access rights
and the repository exists.