I had Installed gitlab ce in docker. I want to make git clone from server via ssh. I set port 3000 in gitlab config. When i try to make git clone i had next: git clone ssh://git@git.site.com:3000/pm/site-crm.git Cloning into 'site-crm'... ssh: connect to host git.site.com port 3000: Connection refused fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
git clone ssh://git@git.site.com:3000/pm/site-crm.git Cloning into 'site-crm'... ssh: connect to host git.site.com port 3000: Connection refused fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
What else i have to do? Thanks.
Check if the SSH port forwarding described in docker-gitlab issue 38 is still valid:
Forward some other port on the host to port 22 of the container and use the
GITLAB_SHELL_SSH_PORT
configuration option to specify the forwarded port to the gitlab application so that the clone urls reflect this.For example, add
-p 3000:22 -e "GITLAB_SHELL_SSH_PORT=3000"
to thedocker run
command.
Now you will notice that the ssh clone urls in the gitlab server will change to the formssh://git@git.local.host:3000/docker/docker-gitlab.git
.
This is still mentioned in this 2017 blog post , which described another approach.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.