它给的SSH和http地址是这样的:
git@6b30d4a6a162:compontent/gitlab-test-component.git
http://6b30d4a6a162/compontent/gitlab-test-component.git
6b30d4a6a162是gitlab的container Info的ID的一部分:
6b30d4a6a16279326a135ee2c7bf7b20094b3199a299ac6345735dd3
我通过上面两个地址都无法git clone。
因为我用virtualbox简单的做了一下端口映射,所以我尝试用
git clone http://localhost:8100/compontent/gitlab-test-component
但会报错:500
有知道的吗?
另外想问一下,ssh-key是不是只要生成一次就行了,可以到处放github、gitlab,或者其他地方的,都是同一份?
Because port 22 of the host has been occupied
Map the 22 port of the container to other ports of the host such as 2222 when docker run
You need to specify the url in the gitlab configuration file
This is what will be displayed in the project warehouse
Then you can use git
At this time, you need to configure the
.ssh/config
file on the development machine to use it normallyThe following is an example of using docker to run gitlab
There is something wrong with the usage. It is definitely not using docker’s container name as the domain name. You have to bind a domain name or use ip + port access to clone it.
@Tairy, didn’t I use domain name + port above?
That’s right
localhost:8100
, but it will report a 500 error. .Can you tell me how you bind it?