sameersbn / docker-gitlab

Dockerized GitLab
http://www.damagehead.com/docker-gitlab/
MIT License
7.91k stars 2.14k forks source link

Git push/pull not working remotely, but works fine within local network #729

Open JorenRapini opened 8 years ago

JorenRapini commented 8 years ago

I have a Synology Diskstation 415+ running Docker 1.11 and Gitlab 8.6.2-0018. My SSH port is on default port 22, I kept the gitlab container ports on 30000 and 30001. I have both ports redirected properly and Gitlab's web interface comes up fine remotely. From within the local network, we are able to git pull/push to gitlab repos without any problem. However, if we try to git push/pull/clone from a remote computer (which also has its SSH keys added to the user profile) we get this message:

ssh: connect to host ourdevserver.com port 30001: Connection timed out fatal: Could not read from remote repository.

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

solidnerd commented 8 years ago

Hey, this seems to be a nat/fw problem. You should check your configuration.

JorenRapini commented 8 years ago

Thanks, that's what I assumed too, but I don't know what else I'd need to do. The router has both ports forwarding, and those ports are both accessible from a web browser remotely.

solidnerd commented 8 years ago

Did you try to open a ssh connection directly from remote ? You could test it with ssh -vvv -p 30001 username@ourdevserver.com This could help to find the problem.

JorenRapini commented 8 years ago

Connection time's out if I use that port. Even though I have 30001 forwarding, it seems docker/gitlab doesn't know to listen for that port for SSH from a remote location, or something like that. I don't really know how any of this works when dealing with Docker though, I'm new to using it. The SYnology Diskstation's firewall is not enabled.

solidnerd commented 8 years ago

How is your port binding for the container.

JorenRapini commented 8 years ago

In synology's gitlab config, it shows "port_bindings":[{"container_port":80,"host_port":30000,"type":"tcp"},{"container_port":22,"host_port":30001,"type":"tcp"}]

Not sure if that was what you were looking for though?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had any activity for the last 60 days. It will be closed if no further activity occurs during the next 7 days. Thank you for your contributions.