Maybe you can try to set the verbose flag on ssh to figure out what is going wrong.
You can use the GIT_SSH
environment variable to substitute the command that git will use to open the ssh connection. From the man page:
GIT_SSH
If this environment variable is set then git fetch and git push
will use this command instead of ssh when they need to connect to a
remote system. The $GIT_SSH command will be given exactly two
arguments: the username@host (or just host) from the URL and the
shell command to execute on that remote system.
To pass options to the program that you want to list in GIT_SSH you
will need to wrap the program and options into a shell script, then
set GIT_SSH to refer to the shell script.
So a script in /tmp/verb-ssh
that looks like:
#!/bin/bash
/usr/bin/ssh -vvv "$@"
and then setting the environment variable GIT_SSH=/tmp/verb-ssh
should provide some useful debugging information.