💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
第一步:注册一个专门为gitlab发送邮箱的账号 ![](https://box.kancloud.cn/0edd53bd524bcf39ea7f6215e7c75e8e_869x664.png) 第二步:配置gitlab.rb [root@gitlab ~]#vim /etc/gitlab/gitlab.rb ### Email Settings gitlab_rails['gitlab_email_enabled'] = true gitlab_rails['gitlab_email_from'] = 'petgit@163.com' gitlab_rails['smtp_enable'] = true gitlab_rails['smtp_address'] = "smtp.163.com" gitlab_rails['smtp_port'] = 25 gitlab_rails['smtp_user_name'] = "petgit@163.com" gitlab_rails['smtp_password'] = "Az123321" gitlab_rails['smtp_domain'] = "163.com" gitlab_rails['smtp_authentication'] = "login" gitlab_rails['smtp_enable_starttls_auto'] = false gitlab_rails['smtp_tls'] = false user['git_user_email']="petgit@163.com" ## GitLab CI ##! Docs: https://docs.gitlab.com/ce/ci/quick_start/README.html ################################################################################ # gitlab_ci['gitlab_ci_all_broken_builds'] = true # gitlab_ci['gitlab_ci_add_pusher'] = true # gitlab_ci['builds_directory'] = '/var/opt/gitlab/gitlab-ci/builds' gitlab_ci['smtp_enable'] = true gitlab_ci['smtp_address'] = "smtp.163.com" gitlab_ci['smtp_port'] = 25 gitlab_ci['smtp_user_name'] = "petgit@163.com" gitlab_ci['smtp_password'] = "Az123321" gitlab_ci['smtp_domain'] = "163.com" gitlab_ci['smtp_authentication'] = "login" gitlab_ci['smtp_enable_starttls_auto'] = false ################################################################################ ## GitLab Mattermost -- INSERT -- [root@server01 gitlab]# vim /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml email_from: petgit@163.com 三)重启gitlab服务 [root@server01 gitlab]# gitlab-ctl reconfigure [root@server01 gitlab]# gitlab-ctl restart 四)测试邮箱 ![](https://box.kancloud.cn/c842a5ad79aecdaf908605396780555f_811x753.png) 在gitlab上创建用户,然后客户端收到对应的邮件 ![](https://box.kancloud.cn/aae082e786ff8e8202ad9f4b8aa20154_763x356.png) 常见错误 http://blog.csdn.net/XIAOMENGH/article/details/72844937