Gitlab start HTTPS

Source: Internet
Author: User

Why do you want to start https? Is it OK to use HTTP? The main reason is that the leader has to do this, so start HTTPS.

To deploy the installation environment:

Ubuntu 16.04.2 LTS \ \l

Deployment criteria:

1. Prepare a domain name that can be used, such as: git.blog.com

2. Generate a secret key for this domain name

Deploy Gitlab, which is based on official documentation

The steps are as follows:

First, install the Gitlab

Install dependent packages

Apt-get install-y Curl Openssh-server ca-certificates

Execute script, add Gitlab to apt warehouse

Curl-s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash

Install GITLAB-CE, latest version

Apt-get Install Gitlab-ce

Second, upload the secret key

Create a directory that holds the keys and authorize 700

Mkdir/etc/gitlab/ssl

chmod 700/etc/gitlab/ssl/
CP-ARF/ROOT/GITB.LOG.COM.CRT git.blog.com.key/etc/gitlab/ssl/


Third, modify the configuration file/etc/gitlab/gitlab.rb

The modified configuration

External_url ' https://git.blog.com '
nginx[' Redirect_http_to_https ') = True
nginx[' ssl_certificate '] = "/ETC/GITLAB/SSL/GIT.BLOG.COM.CRT"
nginx[' ssl_certificate_key '] = "/etc/gitlab/ssl/git.blog.com.key"


To add a mailbox notification:

gitlab_rails[' smtp_enable ') = True
gitlab_rails[' smtp_address '] = "smtp.exmail.qq.com"
gitlab_rails[' smtp_port '] = 465
gitlab_rails[' smtp_user_name ' = "Sender's email address"
gitlab_rails[' smtp_password ' = "password"
gitlab_rails[' smtp_authentication '] = "Login"
gitlab_rails[' Smtp_enable_starttls_auto ') = True
gitlab_rails[' smtp_tls ') = True
gitlab_rails[' gitlab_email_from ' = ' sender's email address '


Iv. Re-loading configuration

Gitlab-ctl Reconfigure

Gitlab-ctl restart


Five, realize the function

650) this.width=650; "Src=" Https://s5.51cto.com/oss/201711/22/9635ef989d2a2e1d08bf7a239872dca1.png-wh_500x0-wm_3 -wmp_4-s_2208437741.png "title=" image 1.png "alt=" 9635ef989d2a2e1d08bf7a239872dca1.png-wh_ "/>



This article is from the "Linux" blog, so be sure to keep this source http://7149553.blog.51cto.com/7139553/1984017

Gitlab start HTTPS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.