Version Control with GitLab on Alibaba Cloud

Step 1: Configure Domain and DNS Records

Add your Domain

Step 2: Install GitLab Community Edition.

GitLab has a free open source community edition, as well as an Enterprise Edition that requires a premium license. For our purposes, GitLab Community Edition should be able to meet all our requirements.
First login to your server by SSH:

# sudo apt-get update
# sudo apt-get install -y curl openssh-server ca-certificates
# sudo apt-get install -y postfix

Step 3: Secure your GitLab Install with SSL

The GitLab package now comes with an automated Let’s Encrypt SSL deployment and configuration process. To enable https is now very easy.

letsencrypt['enable'] = true
letsencrypt['contact_emails'] = ['']
letsencrypt['group'] = 'root'
letsencrypt['key_size'] = '2048'
letsencrypt['owner'] = 'root'
letsencrypt['wwwroot'] = '/var/opt/gitlab/nginx/www'

Step 4: Configure DirectMail SMTP Emails for GitLab

Set up Alibaba Cloud DirectMail

Step 5. Configure Sender Addresses

After you have successfully verified your email domain you can now set the Sender Address. Click the Sender Addresseslink in the left navigation panel.

Step 5: Configure GitLab for SMTP

On your server reopen the GitLab configuration file for editing:

gitlab_rails['gitlab_email_from'] = '<account-name@your-email-domain>'
gitlab_rails['gitlab_email_reply_to'] = 'noreply@<>'
gitlab_rails['smtp_address'] = “<aliyun-smtp-server-address>”
gitlab_rails['gitlab_email_from'] = '<>'
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_port'] = 465
gitlab_rails['smtp_user_name'] = "<>"
gitlab_rails['smtp_password'] = “<your-smtp-password>“
gitlab_rails['smtp_domain'] = “<your-email-domain>”
gitlab_rails['smtp_authentication'] = “login"
gitlab_rails['smtp_openssl_verify_mode' = 'peer'

Step: 6 Complete GitLab Configuration

Add Root (Admin) Password and Login

(Optional) Step 7: Subscribe to Security Update Notifications

There is one more thing you should probably do, subscribe to GitLab emails for security updates. If you don’t do this, you will not receive any notifications of security issues and their patches.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website: