GitLab设置SMTP邮件服务器

GitLab 是一款开源的免费软件。

主要功能:Git repository 管理, 代码 reviews, issue 跟踪等。


安装GitLab


1. Install and configure the necessary dependencies

If you install Postfix to send email please select 'Internet Site' during setup. Instead of using Postfix you can also use Sendmail orconfigure a custom SMTP server. If you wish to use Exim, please configure it as an SMTP server.

On Centos 6 and 7, the commands below will also open HTTP and SSH access in the system firewall.

sudo apt-get install curl openssh-server ca-certificates postfix

使用SMTP邮件服务器,可以不安装postfix


2. Add the GitLab package server and install the package

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo apt-get install gitlab-ce


If you are not comfortable installing the repository through a piped script, you can find theentire script here.


3. Configure and start GitLab

sudo gitlab-ctl reconfigure


4. Browse to the hostname and login

Username: root 

Password: 5iveL!fe



GitLab设置

1.设置SMTP邮件服务器,用于GitLab发送邮件

打开/etc/gitlab/gitlab.rb文件,将以下设置添加到文件中,保存。

gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = “smtp.exmail.qq.com”
gitlab_rails['smtp_port'] = 25
gitlab_rails['smtp_user_name'] = “[email protected]“
gitlab_rails['smtp_password'] = "smtp password"
gitlab_rails['smtp_authentication']= “plain"
gitlab_rails['smtp_enable_starttls_auto']= true
gitlab_rails['gitlab_email_from']= '[email protected]'
gitlab_rails['gitlab_email_reply_to']= ‘[email protected]'

2.设置GitLab服务器外部链接

同样,将以下设置田间到/etc/gitlab/gitlab.rb文件中。

external_url “http://192.168.0.13”

GitLab在发送帐户验证邮件时,会包含此Url





你可能感兴趣的:(GitLab设置SMTP邮件服务器)