How does doc gitlab git clone?

  docker, question

It gives SSH and http addresses like this:


6b30d4a6a162 is part of the ID of gitlab’s container Info:


I cannot git clone through the above two addresses.

Because I did a simple port mapping with virtualbox, I tried to use

git clone http://localhost:8100/compontent/gitlab-test-component

But an error will be reported: 500


Do you know anything?

In addition, I would like to ask whether ssh-key can only be generated once, and github, gitlab, or other places can be placed everywhere in the same copy.

Because host’s port 22 is already occupied

When docker run, map 22 port of container to other ports of host, such as 2222

docker run gitlab -p 2222:22

Url needs to be specified in gitlab’s configuration file.

# modify first line of /etc/gitlab/gitlab.rb file
 external_url ''

In this way, what is displayed in the project warehouse is


Then you can use git

git clone git@

At this time, it needs to be configured on the development machine..ssh/configFile, can normal use

The following is an example of using docker to run gitlab

docker run --name='gitlabend' --link gitlab_mysql:mysql \
 --link gitlab_redis:redisio \
 -e 'GITLAB_PORT=10080' \
 -e 'GITLAB_SSH_PORT=10022' \
 -p 10022:22 -p 10080:80 \
 -e 'GITLAB_HOST=xxxx' \
 -e '' \
 -e 'SMTP_ENABLED=true' \
 -e '' \
 -e '' \
 -e 'SMTP_PORT=25' \
 -e 'SMTP_STARTTLS=false' \
 -e '' \
 -e 'SMTP_PASS=password' \
 -v /opt/gitlab/data:/home/git/data \
 -v /opt/gitlab/log:/var/log/gitlab \