{"id":6724,"date":"2018-09-14T17:30:23","date_gmt":"2018-09-14T13:30:23","guid":{"rendered":"https:\/\/www.howtoforge.com\/tutorial\/how-to-install-and-configure-gitlab-on-ubuntu-1804\/"},"modified":"2018-09-14T17:30:23","modified_gmt":"2018-09-14T13:30:23","slug":"how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts\/","title":{"rendered":"How to Install and Configure GitLab on Ubuntu 18.04 LTS"},"content":{"rendered":"<p>GitLab is an open source GIT repository manager based on Rails and developed by GitLab Inc. It is a web-based GIT repository manager that allows your team to work on code, perform feature requests, track bugs, and test and implement applications. GitLab provides features such as a wiki, issue tracking, code reviews, activity feeds, and merge management. It is able to host multiple projects.<\/p>\n<p>GitLab is available in four editions:<\/p>\n<ol>\n<li>Gitlab CE (Community Edition) &#8211; self-hosted, free and support from the Community forum.<\/li>\n<li>Gitlab EE (Enterprise Edition) &#8211; self-hosted, paid app, comes with additional features.<\/li>\n<li>GitLab.com &#8211; SaaS, free.<\/li>\n<li>GitLab.io &#8211; Private GitLab instance managed by GitLab Inc.<\/li>\n<\/ol>\n<p>In this tutorial, I will show you step-by-step how to install GitLab CE (Community Edition) on your own Ubuntu 18.04 LTS (Bionic Beaver) server. I will be using the &#8216;omnibus&#8217; package provided by GitLab for easy installation.<\/p>\n<h2 id=\"prerequisites\">Prerequisites<\/h2>\n<ul>\n<li>Ubuntu 18.04 Server<\/li>\n<li>Min RAM memory 4GB &#8211; for better performance, use 8GB<\/li>\n<li>Root privileges<\/li>\n<\/ul>\n<h2 id=\"what-we-will-do\">What we will do<\/h2>\n<ol>\n<li>Update Repository and Upgrade Packages<\/li>\n<li>Install Dependencies<\/li>\n<li>Install GitLab Community Edition<\/li>\n<li>Generate SSL Letsencrypt and DHPARAM Certificate<\/li>\n<li>Configure HTTPS for GitLab<\/li>\n<li>Configure Ubuntu UFW Firewall<\/li>\n<li>GitLab Post-Installation<\/li>\n<li>Testing<\/li>\n<\/ol>\n<h2 id=\"step-update-repository-and-upgrade-packages\">Step 1 &#8211; Update Repository and Upgrade Packages<\/h2>\n<p>Before installing any packages on the system, update all available repositories and then upgrade all packages on the system.<\/p>\n<p>Run apt commands below.<\/p>\n<p class=\"command\">sudo apt update<br \/>sudo apt upgrade -y<\/p>\n<p>Wait for the installation packages that will be upgraded.<\/p>\n<p><a class=\"fancybox\" id=\"img-1\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/1.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts.png\" alt=\"Install Ubuntu updates\" width=\"500\" height=\"262\" title=\"\"><\/a><\/p>\n<h2 id=\"step-install-gitlab-dependencies\">Step 2 &#8211; Install Gitlab Dependencies<\/h2>\n<p>GitLab needs some packages dependencies for the installation, including curl, postfix, and ca-certificates.<\/p>\n<p>Install GitLab packages dependencies using the apt command below.<\/p>\n<p class=\"command\">sudo apt install curl openssh-server ca-certificates postfix -y<\/p>\n<p>During postfix installation, you will be prompted about the configuration, select &#8216;Internet Site&#8217;.<\/p>\n<p><a class=\"fancybox\" id=\"img-2\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/2.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-1.png\" alt=\"Configure Postfix\" width=\"500\" height=\"403\" title=\"\"><\/a><\/p>\n<p>And then enter the server domain name that shall be used for sending an email.<\/p>\n<p><a class=\"fancybox\" id=\"img-3\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/3.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-2.png\" alt=\"Enter the domain name\" width=\"500\" height=\"118\" title=\"\"><\/a><\/p>\n<p>And we&#8217;re ready to install GitLab on the server.<\/p>\n<h2 id=\"step-install-gitlab\">Step 3 &#8211; Install GitLab<\/h2>\n<p>In this step, we will install GitLab using the omnibus packages. The Omnibus will install all packages, services, and tools required for running GitLab on the server.<\/p>\n<p>Add GitLab repository with the curl command.<\/p>\n<p class=\"command\">curl -sS https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ce\/script.deb.sh | sudo bash<\/p>\n<p><a class=\"fancybox\" id=\"img-4\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/4.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-3.png\" alt=\"Download gitlab install script\" width=\"500\" height=\"159\" title=\"\"><\/a><\/p>\n<p>And then install GitLab CE Community Edition with the apt command.<\/p>\n<p class=\"command\">sudo apt install gitlab-ce -y<\/p>\n<p>The command will download and install the GitLab CE package, and when the installation is complete, you will see the results as below.<\/p>\n<p><a class=\"fancybox\" id=\"img-5\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/5.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-4.png\" alt=\"Gitlab CE installation routine starts\" width=\"500\" height=\"416\" title=\"\"><\/a><\/p>\n<p>Next, we should configure the URL that will be used to access our GitLab server. We will be using a domain named &#8216;git.hakase-labs.pw&#8217; for the GitLab access URL and will enable the HTTPS on it.<\/p>\n<p>To change the GitLab URL access, edit the &#8216;\/etc\/gitlab\/gitlab.rb&#8217; file.<\/p>\n<p class=\"command\">sudo vim \/etc\/gitlab\/gitlab.rb<\/p>\n<p>Now change the &#8216;external_url&#8217; value with your own domain name.<\/p>\n<pre>external_url 'http:\/\/git.hakase-labs.pw'<\/pre>\n<p>Save and exit.<\/p>\n<h2 id=\"step-generate-lets-encrypt-ssl-certificate-and-dhparam-certificate\">Step 4 &#8211; Generate Let&#8217;s encrypt SSL Certificate and DHPARAM Certificate<\/h2>\n<p>In this step, we will generate a new Letsencrypt certificate and DHPARAM certificate for the GitLab domain name &#8216;git.hakase-labs.pw&#8217;.<\/p>\n<p>Install the lets encrypt tool using the apt command below.<\/p>\n<p class=\"command\">sudo apt install letsencrypt -y<\/p>\n<p>And after the installation is complete, run the letsencrypt command below.<\/p>\n<p class=\"command\">sudo letsencrypt certonly &#8211;standalone &#8211;agree-tos &#8211;no-eff-email &#8211;agree-tos &#8211;email <a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"bbcfded5c8dad2cfcec3828288fbdcd6dad2d795d8d4d6\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a> -d git.hakase-labs.pw<\/p>\n<p>And when it&#8217;s complete, you will get the result as shown below.<\/p>\n<p><a class=\"fancybox\" id=\"img-6\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/6.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-5.png\" alt=\"Get lets encrypt SSL certificate\" width=\"500\" height=\"233\" title=\"\"><\/a><\/p>\n<p>SSL Letsencrypt certificates have been generated, located in the &#8216;\/etc\/letsencyrpt\/&#8217; directory.<\/p>\n<p>Next, we will generate the DHPARAM certificate using the OpenSSL command.<\/p>\n<p>Create a new directory &#8216;\/etc\/gitlab\/ssl&#8217; and run the OpenSSL command below.<\/p>\n<p class=\"command\">sudo mkdir -p \/etc\/gitlab\/ssl\/<br \/>sudo openssl dhparam -out \/etc\/gitlab\/ssl\/dhparams.pem 2048<\/p>\n<p>Now change the permission of the SSL directory.<\/p>\n<p class=\"command\">chmod 600 \/etc\/gitlab\/ssl\/*<\/p>\n<p><a class=\"fancybox\" id=\"img-7\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/7.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-6.png\" alt=\"Get DHPARAM file\" width=\"500\" height=\"164\" title=\"\"><\/a><\/p>\n<p>And all certificates needed for GitLab HTTPS configuration have been generated.<\/p>\n<h2 id=\"step-configure-https-for-gitlab\">Step 5 &#8211; Configure HTTPS for GitLab<\/h2>\n<p>In order to enable the HTTPS for GitLab installation, we need to edit the &#8216;gitlab.rb&#8217; file.<\/p>\n<p>Edit the &#8216;\/etc\/gitlab\/gitlab.rb&#8217; file using the\u00a0<a href=\"https:\/\/www.howtoforge.com\/vim-basics\" target=\"_blank\" rel=\"noopener noreferrer\">vim command<\/a> below.<\/p>\n<p class=\"command\">sudo vim \/etc\/gitlab\/gitlab.rb<\/p>\n<p>Change the &#8216;external_url&#8217; of Gitlab to the &#8216;https:\/\/git.hakase-labs.pw&#8217;.<\/p>\n<pre>external_url 'https:\/\/git.hakase-labs.pw'<\/pre>\n<p>Now paste configuration below to the &#8216;#GitLab Nginx&#8217; section.<\/p>\n<pre>nginx['redirect_http_to_https'] = true&#13;\nnginx['ssl_certificate'] = \"\/etc\/letsencrypt\/live\/git.hakase-labs.pw\/fullchain.pem\"&#13;\nnginx['ssl_certificate_key'] = \"\/etc\/letsencrypt\/live\/git.hakase-labs.pw\/privkey.pem\"&#13;\nnginx['ssl_dhparam'] = \"\/etc\/gitlab\/ssl\/dhparams.pem\"<\/pre>\n<p>Save and exit.<\/p>\n<p><a class=\"fancybox\" id=\"img-8\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/8.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-7.png\" alt=\"Configure SSL in Gitlab\" width=\"500\" height=\"183\" title=\"\"><\/a><\/p>\n<p>Now run the &#8216;gitlab-ctl&#8217; command below.<\/p>\n<p class=\"command\">sudo gitlab-ctl reconfigure<\/p>\n<p>This command will install and configure GitLab based on the &#8216;\/etc\/gitlab\/gitlab.rb&#8217; configuration file.<\/p>\n<p>And when it&#8217;s complete, you will see the result as below.<\/p>\n<p><a class=\"fancybox\" id=\"img-9\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/9.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-8.png\" alt=\"Restart services\" width=\"500\" height=\"385\" title=\"\"><\/a><\/p>\n<p>The GitLab installation is complete, and HTTPS for GitLab has been enabled.<\/p>\n<h2 id=\"step-configure-ubuntu-ufw-firewall\">Step 6 &#8211; Configure Ubuntu UFW Firewall<\/h2>\n<p>In this step, we will enable the Ubuntu UFW firewall. It&#8217;s already installed on the system, we just need to start the service. We will run GitLab behind the Ubuntu UFW firewall, so we must open the HTTP and HTTPS ports.<\/p>\n<p>Add ssh, http, and https services to the configuration.<\/p>\n<p class=\"command\">sudo ufw allow ssh<br \/>sudo ufw allow http<br \/>sudo ufw allow https<\/p>\n<p>And enable the Ubuntu UFW firewall with the command below.<\/p>\n<p class=\"command\">sudo ufw enable<\/p>\n<p>Type &#8216;y&#8217; for yes to enabled it.<\/p>\n<p>Now check all services and ports list on the list.<\/p>\n<p class=\"command\">sudo ufw status<\/p>\n<p>And you will get ssh, http, and https services on the list.<\/p>\n<p><a class=\"fancybox\" id=\"img-10\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/10.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-9.png\" alt=\"Configure the firewall\" width=\"500\" height=\"363\" title=\"\"><\/a><\/p>\n<h2 id=\"step-gitlab-postinstallation\">Step 7 &#8211; GitLab Post-Installation<\/h2>\n<p>Open the web browser and type in the gitlab URL &#8216;git.hakase-labs.pw&#8217;, and you will be redirected to the HTTPS connection.<\/p>\n<h3 id=\"create-a-new-gitlab-root-password\">Create a New GitLab Root Password<\/h3>\n<p>Type your new password for root GitLab user, and click the &#8216;Change your password&#8217; button.<\/p>\n<p><a class=\"fancybox\" id=\"img-11\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/11.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-10.png\" alt=\"Set Gitlab root password\" width=\"500\" height=\"304\" title=\"\"><\/a><\/p>\n<p>Now Login as a &#8216;root&#8217; user with your own password and click the &#8216;Login&#8217; button.<\/p>\n<p><a class=\"fancybox\" id=\"img-12\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/12.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-11.png\" alt=\"Log in as root\" width=\"500\" height=\"301\" title=\"\"><\/a><\/p>\n<p>Now you will get the GitLab Dashboard.<\/p>\n<p><a class=\"fancybox\" id=\"img-13\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/13.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-12.png\" alt=\"Gitlab dashboard\" width=\"500\" height=\"295\" title=\"\"><\/a><\/p>\n<h3 id=\"change-profile\">Change Profile<\/h3>\n<p>Click the profile button and choose &#8216;Settings&#8217;.<\/p>\n<p><a class=\"fancybox\" id=\"img-14\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/14.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-13.png\" alt=\"Change user profile settings\" width=\"500\" height=\"282\" title=\"\"><\/a><\/p>\n<p>On the &#8216;Main Settings&#8217; section, type the profile name &#8216;hakase&#8217; and then click the &#8216;update profile settings&#8217; option.<\/p>\n<h3 id=\"change-username\">Change Username<\/h3>\n<p>Click the &#8216;Account&#8217; tab and type the username &#8216;hakase&#8217;.<\/p>\n<p><a class=\"fancybox\" id=\"img-15\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/15.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-14.png\" alt=\"Change username\" width=\"500\" height=\"267\" title=\"\"><\/a><\/p>\n<p>Now press the &#8216;Update username&#8217; button.<\/p>\n<h3 id=\"add-ssh-key\">Add SSH Key<\/h3>\n<p>Generate a new key using the ssh-keygen command as below.<\/p>\n<p class=\"command\">ssh-keygen<br \/>cat ~\/.ssh\/id_rsa.pub<\/p>\n<p>Copy the &#8216;id_rsa.pub&#8217; key.<\/p>\n<p><a class=\"fancybox\" id=\"img-16\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/16.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-15.png\" alt=\"Add an SSH key\" width=\"500\" height=\"352\" title=\"\"><\/a><\/p>\n<p>Now back to the GitLab user dashboard and click the &#8216;SSH Key&#8217; menu on the left.<\/p>\n<p><a class=\"fancybox\" id=\"img-17\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/17.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-16.png\" alt=\"Add SSH key in Gitlab\" width=\"500\" height=\"302\" title=\"\"><\/a><\/p>\n<p>Paste the ssh public key &#8216;id_rsa.pub&#8217; and click the &#8216;Add key&#8217; button.<\/p>\n<h3 id=\"sign-up-restrictions\">Sign up Restrictions<\/h3>\n<p>Click the &#8216;Admin area&#8217; button on the middle, then click &#8216;Settings&#8217;.<\/p>\n<p><a class=\"fancybox\" id=\"img-18\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/18.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-17.png\" alt=\"Configure sign-up restrictions\" width=\"500\" height=\"287\" title=\"\"><\/a><\/p>\n<p>Uncheck the &#8216;signup enabled&#8217; option and click the &#8216;Save changes&#8217; button.<\/p>\n<h3 id=\"account-limit\">Account Limit<\/h3>\n<p>Click on the &#8216;Account and limit&#8217; section and set the default project limit to 20.<\/p>\n<p><a class=\"fancybox\" id=\"img-19\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/19.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-18.png\" alt=\"Set account limits\" width=\"500\" height=\"289\" title=\"\"><\/a><\/p>\n<p>And click the &#8216;Save changes&#8217; button.<\/p>\n<h2 id=\"step-testing-gitlab\">Step 8 &#8211; Testing Gitlab<\/h2>\n<p>Finally, we will do some tests to ensure that our GitLab system is working properly.<\/p>\n<h3 id=\"create-new-project\">Create New Project<\/h3>\n<p>Click the plus icon on the top mid to create a new project repository. Type in your project name, description, and set up the visibility settings of your project. Then click on the &#8216;Create project&#8217; button.<\/p>\n<p><a class=\"fancybox\" id=\"img-20\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/20.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-19.png\" alt=\"Create project\" width=\"500\" height=\"304\" title=\"\"><\/a><\/p>\n<p>The new project has been created.<\/p>\n<h3 id=\"test-first-commit-and-push\">Test First Commit and Push<\/h3>\n<p>Now we will start adding new content to the repository. Make sure Git is installed on your computer, and we need to set up the global username and email for git with the command below.<\/p>\n<p class=\"command\">git config &#8211;global user.name &#8220;hakase&#8221;<br \/>git config &#8211;global user.email &#8220;<a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"78191c15111638101913190b1d5514191a0b561117\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a>&#8220;<\/p>\n<p>Clone the Repository and add a README.md file.<\/p>\n<p class=\"command\">git clone https:\/\/git.hakase-labs.pw\/hakase\/project01.git<br \/>cd project01\/<br \/>vim README.md<\/p>\n<p>You will be asked for the &#8216;hakase&#8217; user password. Please type the same password that you used when we accessed GitLab the first time.<\/p>\n<p>Commit a new file to the &#8216;project01&#8217; repository.<\/p>\n<p class=\"command\">git add .<br \/>git commit -m &#8216;Add README.md file by hakase-labs&#8217;<\/p>\n<p>Next, push the change to the repository on the GitLab server.<\/p>\n<p class=\"command\">git push origin master<\/p>\n<p>Type in your password and press Enter to continue. You will see the result as below.<\/p>\n<p><a class=\"fancybox\" id=\"img-21\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/21.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-20.png\" alt=\"Git test commit\" width=\"500\" height=\"449\" title=\"\"><\/a><\/p>\n<p>Now open the &#8216;project01&#8217; project from your web browser, and you will see that the new README.md file has been added to the repository.<\/p>\n<p><a class=\"fancybox\" id=\"img-22\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_gitlab_on_ubuntu_1804\/big\/22.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-21.png\" alt=\"Test project in Gitlab\" width=\"500\" height=\"304\" title=\"\"><\/a><\/p>\n<p>GitLab installation guide on Ubuntu 18.04 has been completed successfully.<\/p>\n<h2 id=\"reference\">Reference<\/h2>\n<div class=\"authorbox\" readability=\"15\">\n<p><strong>About Muhammad Arul<\/strong><\/p>\n<p>Muhammad Arul is a freelance system administrator and technical writer. He is working with Linux Environments for more than 5 years, an Open Source enthusiast and highly motivated on Linux installation and troubleshooting. Mostly working with RedHat\/CentOS Linux and Ubuntu\/Debian, Nginx and Apache web server, Proxmox, Zimbra Administration, and Website Optimization. Currently learning about OpenStack and Container Technology.<\/p>\n<\/div>\n<div>\n<p><b>Share this page:<\/b><\/p>\n<p>\n<a href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fhow-to-install-and-configure-gitlab-on-ubuntu-1804%2F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-22.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fhow-to-install-and-configure-gitlab-on-ubuntu-1804%2F&amp;text=How+to+Install+and+Configure+GitLab+on+Ubuntu+18.04+LTS&amp;via=howtoforgecom&amp;related=howtoforgecom\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-23.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/twitter.com\/howtoforgecom\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-24.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/plus.google.com\/share?url=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fhow-to-install-and-configure-gitlab-on-ubuntu-1804%2F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-and-configure-gitlab-on-ubuntu-18-04-lts-25.png\" height=\"20\" alt=\"\" title=\"\"><\/a>\n<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>GitLab is an open source GIT repository manager based on Rails and developed by GitLab Inc. It is a web-based GIT repository manager that allows your team to work on code, perform feature requests, track bugs, and test and implement applications. GitLab provides features such as a wiki, issue tracking, code reviews, activity feeds, and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-6724","post","type-post","status-publish","format-standard","hentry","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/6724","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=6724"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/6724\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=6724"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=6724"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=6724"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}