CentOS 7 无法添加 Gitlab 包仓库和安装
CentOS 7 Unable to add Gitlab package repository and install
Objective: 在我的Centos7上安装gitlab。
指令:https://about.gitlab.com/install/#centos-7
错误:
[root@enlabsapp067 deployer]# curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash <br>
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0curl: (7) Failed connect to packages.gitlab.com:443; Connection refused
非常感谢您的帮助。
调试检查
- CentOS Linux 发行版 7.6.1810(核心)
- sshd - 活动 (运行)
- firewalld - 活动 (运行)
- 后缀 - 活跃 (运行)
这不应与安装脚本本身有关,而应与某些网络问题有关。
例如:“gitlab-org/gitlab-runner
issue 4068”(无法在 CentOS 中安装 Runner)提到:
Cannot replicate this, can you check local firewall and that the port is open?
E.g. check that the following command connects:
nc -v packages.gitlab.com 443
GitLab Requirements 页面将 CentOS 列为受支持的。
gitlab-org/gitlab-runner
issue 4555 proposed, from Mohsen Ibrahim
I resolved the issue by following these simple steps:
- Removed all files in
/etc/gitlab/ssl
folder.
- Removed all configuration options for using a custom SSL certificate in
/etc/gitlab/gitlab.rb
file such as registry_nginx["ssl_certificate"]
and registry_nginx["ssl_certificate_key"]
.
Used gitlab's LetsEencrypt features by adding these lines to /etc/gitlab/gitlab.rb
file
letsencrypt['enable'] = true
letsencrypt['contact_emails'] = ['mohsen@mail.com']
Then reconfigured gitlab with this command sudo gitlab-ctl reconfigure
.
Objective: 在我的Centos7上安装gitlab。
指令:https://about.gitlab.com/install/#centos-7
错误:
[root@enlabsapp067 deployer]# curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash <br>
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0curl: (7) Failed connect to packages.gitlab.com:443; Connection refused
非常感谢您的帮助。
调试检查
- CentOS Linux 发行版 7.6.1810(核心)
- sshd - 活动 (运行)
- firewalld - 活动 (运行)
- 后缀 - 活跃 (运行)
这不应与安装脚本本身有关,而应与某些网络问题有关。
例如:“gitlab-org/gitlab-runner
issue 4068”(无法在 CentOS 中安装 Runner)提到:
Cannot replicate this, can you check local firewall and that the port is open?
E.g. check that the following command connects:nc -v packages.gitlab.com 443
GitLab Requirements 页面将 CentOS 列为受支持的。
gitlab-org/gitlab-runner
issue 4555 proposed, from Mohsen Ibrahim
I resolved the issue by following these simple steps:
- Removed all files in
/etc/gitlab/ssl
folder.- Removed all configuration options for using a custom SSL certificate in
/etc/gitlab/gitlab.rb
file such asregistry_nginx["ssl_certificate"]
andregistry_nginx["ssl_certificate_key"]
.Used gitlab's LetsEencrypt features by adding these lines to
/etc/gitlab/gitlab.rb
fileletsencrypt['enable'] = true letsencrypt['contact_emails'] = ['mohsen@mail.com']
Then reconfigured gitlab with this command
sudo gitlab-ctl reconfigure
.