Fixed the issue with git clone via ssh when https is used and custom listen port is configured.