我们创建了一个EC2实例并安装了Gitlab,然后创建了一个应用程序负载均衡器,并通过HTTPS在子域上对其进行了配置,一切正常,创建了一个新的存储库,添加了ssh-keys(如果我们克隆了HTTPS完全可以,但是通过SSH我们无法为该错误克隆它:
`ssh: connect to host gitlab.our.subdomain port 22: Connection refused`
```
git clone git@gitlab.our.subdomain:ucrea/ucrea_portal.git
Cloning into 'ucrea_portal'...
ssh: connect to host gitlab.realhost.cloud port 22: Connection refused
```
通过SSH克隆项目
```
git clone git@gitlab.realhost.cloud:ucrea/ucrea_portal.git
Cloning into 'ucrea_portal'...
ssh: connect to host gitlab.our.dubdomain port 22: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
```
发行人ID:Ubuntu 说明:Ubuntu 18.04.1 LTS 发行:18.04 代号:bionic
```
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-============================================================-===================================-===================================-==============================================================================================================================
ii gitlab-ce 11.3.4-ce.0 amd64 GitLab Community Edition (including NGINX, Postgres, Redis)
un gitlab-ee <none> <none> (no description available)
```
答案 0 :(得分:2)
@Ulises 使用经典的弹性负载平衡器,允许进入端口80和22具有安全组。