今天打开gitlab dashboard (https://gitlab.test.com)提示:

gitlab The certificate expired

查看自己配置的证书:

[root@gitlab ~]# cat /etc/gitlab/gitlab.rb |grep test.com
external_url 'https://gitlab.test.com'
registry_external_url 'https://gitlab.test.com:4567'
registry_nginx['ssl_certificate'] = "/etc/gitlab/ssl/test.com.crt"
registry_nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/test.com.key"
nginx['ssl_certificate'] = "/etc/gitlab/ssl/test.com.crt"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/test.com.key"

更换/etc/gitlab/ssl/下的新证书后,必须执行recofigure一次,否则怎样重启都是没有用的。

gitlab-ctl reconfigure

推荐使用“Let's Encrypt” 的免费证书,可以免费使用3个月,你可以写一个脚本,放在cron中,每三个月自动更新一次证书

申请免费证书网站:https://letsencrypt.org/

参考:

https://docs.gitlab.com/omnibus/settings/ssl.html

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐