关闭

GitLab设置SMTP邮件服务器

标签: gitlab
5103人阅读 评论(0) 收藏 举报
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'] = “allen@cloudminds.com“
gitlab_rails['smtp_password'] = "smtp password"
gitlab_rails['smtp_authentication']= “plain"
gitlab_rails['smtp_enable_starttls_auto']= true
gitlab_rails['gitlab_email_from']= 'allen@cloudminds.com'
gitlab_rails['gitlab_email_reply_to']= ‘noreply@cloudminds.com'

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

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

<span style="font-size:14px;">external_url “http://192.168.0.13”</span>

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





0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:5154次
    • 积分:62
    • 等级:
    • 排名:千里之外
    • 原创:1篇
    • 转载:0篇
    • 译文:0篇
    • 评论:0条
    文章存档
    阅读排行