Recently I've built an docker container with gitlab behind an traefik revers proxy container. I was easily able to log in via https. But when I try to clone a repository with intellij (or git bash) I get the error
ssh: connect to host git.domain.de port 22: Connection refused
fatal: Could not read from remote repository.
The docker-compose file sets the ports:
ports:
- 80
- 22:22
And Traefik is just listening on port 80 and 443.
So has anybody any idea what is causing this problem or how to track it? Why can I log into the web UI but can't clone any repository? The logs doesn't give any information of refused connections or errors. But if it is helpfull then I can upload some logs here.
So has anybody any idea what is causing this problem or how to track it?
There is something wrong with your network configuration. Your git client cannot reach your gitlab installation on port 22.
Why can I log into the web UI but can't clone any repository? Because you use 80/443 ports for your web UI, but you use port 22 for cloning with your git client.
If you do not mind cloning over https, and gitlab supports it, you might try that. If you want to get cloning over SSH working, you need to troubleshoot your port 22 connection. Depending on your network configuration it could be anywhere.
Here are some things you might want to try:
Clearly one of those will fail. When it does, you will have to identify the reason for that, and fix the problem.