Gitlab Server Enable HTTPS

Source: Internet
Author: User

One day, was infiltrated by the Intranet, and began to put the most valuable code server gitlab7.10.5 plus SSL, the following record flow.

It was originally accessed by http:

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/8B/A4/wKioL1hT2UHiCwOkAAByLqWNVfA313.png "title=" 1.png " alt= "Wkiol1ht2uhicwokaabylqwnvfa313.png"/> 1. Modify the configuration file:

sudo vim/etc/gitlab/gitlab.rb

The changes are as follows:

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/8B/A4/wKioL1hT2jSBjriaAAASYD5oGyY413.png "title=" Qq20161216195502.png "alt=" Wkiol1ht2jsbjriaaaasyd5ogyy413.png "/>

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/8B/A8/wKiom1hT2kGT1nRvAAArLk6wBUA910.png "title=" 1.png " alt= "Wkiom1ht2kgt1nrvaaarlk6wbua910.png"/>

2. Generate the secret key and certificate:

Due to the difficulty of generating the secret key and the certificate, write a script (see attachment, change the name to ssl_genkey.sh). Enter the input information where the appropriate information, first is the domain name/address, the following need to enter the password 4 times, password arbitrarily specified, but 4 times the input is consistent.

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/8B/A4/wKioL1hT2-iR2E6IAABvDNyetr0551.png "title=" 1.png " alt= "Wkiol1ht2-ir2e6iaabvdnyetr0551.png"/>

The following are generated:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/8B/A8/wKiom1hT3DDypOq3AAAL7J9qg4k336.png "title=" 1.png " alt= "Wkiom1ht3ddypoq3aaal7j9qg4k336.png"/>

The circle is useful, and the others can be erased.

Move to the appropriate location:

sudo mkdir-p/etc/gitlab/sslsudo chmod 700/etc/gitlab/ssl/-rsudo CP 172.16.4.112.crt/etc/gitlab/ssl/server.crtsudo CP 172.16.4.112.key/etc/gitlab/ssl/server.key

3. Rebuild the configuration:

sudo gitlab-ctl reconfigure

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/8B/A5/wKioL1hT3THhtuY3AAAsluWm3l0552.png "title=" 1.png " alt= "Wkiol1ht3thhtuy3aaasluwm3l0552.png"/>

The browser can access it using https:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/8B/A8/wKiom1hT3aTyR51TAAD9qBBl2dw452.png "title=" 1.png " alt= "Wkiom1ht3atyr51taad9qbbl2dw452.png"/>

This article is from the "Black Time" blog, so be sure to keep this source http://blacktime.blog.51cto.com/11722918/1883470

Gitlab Server Enable 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.