docker gitlab 配置163郵箱

2021-09-19 12:38:11 字數 1128 閱讀 8130

進入gitlab容器

docker exec -it gitlab /bin/bash
修改/etc/gitlab/gitlab.rb配置檔案

vi /etc/gitlab/gitlab.rb
gitlab_rails['smtp_enable'] = true

gitlab_rails['smtp_address'] = "smtp.163.com"

gitlab_rails['smtp_port'] = 25

gitlab_rails['smtp_user_name'] = "xx**@163.com"

gitlab_rails['smtp_password'] = "*****" // 不是郵箱的登入密碼,自己設定的授權碼

gitlab_rails['smtp_domain'] = "163.com"

gitlab_rails['smtp_authentication'] = "login"

gitlab_rails['smtp_enable_starttls_auto'] = true

gitlab_rails['smtp_tls'] = false

// 修改gitlab配置的發信人

gitlab_rails['gitlab_email_from'] = "xx**@163.com"

user["git_user_email"] = "xx**@163.com"

配置完之後重啟gitlab

docker restart gitlab
進入到gitlab容器測試是否可以傳送成功

docker exec -it gitlab /bin/bash

gitlab-rails console

notify.test_email('1107***[email protected]', 'message subject', 'message body').deliver_now

配圖一張

Docker Gitlab中文版安裝與配置

拉取gitlab中文版映象docker pull twang2218 gitlab ce zh latest 新建掛載目錄 1.配置檔案 mkdir docker gitlab config 2.執行日誌 mkdir docker gitlab logs 3.資料 mkdir docker gitl...

docker gitlab安裝筆記

docker pull gitlab gitlab ce啟動容器,其中,443是https埠,333是ssh埠,8899是頁面埠 mkdir home gitlab 建立gitlab工作目錄 docker run itd p 443 443 p 8899 8899 p 333 333 name gi...

docker gitlab 無法訪問及502錯誤

1 docker gitlab建立 docker run d name gitlab restart always p 8443 443 p 83 80 p 8822 22 v gitlab config etc gitlab v gitlab logs var log gitlab v gitla...