容器运行成功后,在/etc/gitlab/gitlab.rb文件最后,增加以下配置项:
gitlab_rails['smtp_enable'] = true gitlab_rails['smtp_address'] = "smtp.exmail.qq.com" gitlab_rails['smtp_port'] = 465 gitlab_rails['smtp_user_name'] = "git@xxx.com" gitlab_rails['smtp_password'] = "*****" gitlab_rails['smtp_authentication'] = "login" gitlab_rails['smtp_enable_starttls_auto'] = true gitlab_rails['smtp_tls'] = true gitlab_rails['gitlab_email_from'] = 'git@xxx.com' gitlab_rails['smtp_domain'] = "exmail.qq.com" external_url "https://git.xxx.com" gitlab_rails['gitlab_shell_ssh_port'] = 5022 nginx['redirect_http_to_https'] = true registry_nginx['redirect_http_to_https'] = true mattermost_nginx['redirect_http_to_https'] = true gitlab_rails['time_zone'] = 'Asia/Shanghai'
容器化部署gitlab之后,ssh方式clone工程,命名配置了key,还总提示要密码
1、在容器内执行以下语句,来设置宿主机对容器的SSH转发
解决方法原文:https://blog.csdn.net/wo18237095579/article/details/81105264
ssh -N -v -R 5022:127.0.0.1:80 root@123.56.86.52
2、在容器内执行以下命令(可以解决ubuntu镜像的ssh的bug),
解决方法原文:https://blog.csdn.net/halley333/article/details/52786938
sed '/pam_loginuid.so/s/^/#/g' -i /etc/pam.d/*