Running git commands in private repo inside docker not working correctly

This might be obvious, but have you checked that the ssh directory and files in it have tight permissions? That’s something ssh is picky about, and probably git using ssh, too. Mode 700 on directory, 600 on files is tight.