[SOLVED] Cannot push existing git repo to gitlab


I’ve installed gitlab-ce on my debian server and set it up on port (let’s say 1234). I’ve forwarded this port on my router, so I can access it from outside. This also works. Now I’ve generated my ssh key and entered it in my profile page. Then I tried to push my existing repo to gitlab, which didn’t work:

ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I managed to push the repo using my local network ip:

git remote add origin git@

The repo is now in gitlab with all previous commits and so on. However, now I tried to clone it to a different folder with the ip from outside:

git clone git@111.222.333.444:group/project.git
git clone git@111.222.333.444:1234/group/project.git
git clone ssh://git@111.222.333.444:1234/group/project.git
git clone http://git@111.222.333.444:1234/group/project.git
git clone https://git@111.222.333.444:1234/group/project.git

I tried alot, but nothing worked. Most of the time I get the above error.

I changed a few lines in the config files, but honestly I don’t know what to do anymore. I could need some guidance. I appreciate every help I can get.

Thanks in advance.

After hours of trying, I make a thread. Then I try a few more things and now it seems to work.

I realized, that I sometimes get output with the port 22 (ssh -v git@myserver.com). So I thought that I should forward the port, to let’s say 1111. Now I clone using ssh://git@… :1111/… and it works. =)