Setup
There is a host (H1) running gitlab-ce git server within a docker container (C1). The host's OpenSSH server runs on port 22 and provides a host key keyH. The gitlab container provides its own SSH service that is published to host like 10022:22
and provides an own host key keyC.
Problem
On a separate client system, when calling git clone git@H1:10022/<group>/<project>
I expect to get connection to the SSH server within container C1. Indeed, I only get connection to host H1 and I get keyH presented (it seems port 22 of the host is used for cloning). Of cause, that leads to a failed clone.
But
Generally (from the same client) pulling and pushing form this dockerized git server works when defining a remote like:
git remote -v
origin ssh://git@H1:10022/group/project.git (fetch)
origin ssh://git@H1:10022/group/project.git (push)
So it seems, there is a difference in protocol between ssh://git@H1...
and git@H1...
. But I think git is communicating via HTTP(S) or SSH, only? What is the difference/problem here?
Platform
- Ubuntu 14.04.2 (todays upstream patch level)
- git client 1.9.1
- gitlab 7.13-stable official Dockerfile