{"id":117739,"date":"2024-10-21T12:02:13","date_gmt":"2024-10-21T12:02:13","guid":{"rendered":"\/tutorials\/?p=117739"},"modified":"2026-03-10T10:10:21","modified_gmt":"2026-03-10T10:10:21","slug":"gitlab-tutorial","status":"publish","type":"post","link":"\/uk\/tutorials\/gitlab-tutorial","title":{"rendered":"GitLab tutorial: How to use GitLab for project management and CI\/CD"},"content":{"rendered":"<p>GitLab is a powerful Git repository platform that helps improve development efficiency through version control, branching, as well as continuous integration and continuous delivery (CI\/CD).<\/p><p>In this GitLab tutorial, we will explain all about this platform. We will show you how to navigate its dashboard, set up a CI\/CD pipeline, and use commands for different tasks. You will also learn several advanced techniques, like using webhooks and GitLab Pages.<\/p><p>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-setting-up-gitlab\">Setting up GitLab<\/h2><p>First, purchase a <a href=\"\/uk\/vps\/gitlab-hosting\">GitLab hosting plan<\/a> from a provider like Hostinger. Alternatively, you can install GitLab manually on your personal machine.<\/p><p>Then, create a GitLab account to access the dashboard. Open GitLab by entering your server&rsquo;s IP address into a web browser and then sign up or log in to your account.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e0afda7858c\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"710\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/10\/gitlab-login-screen-1024x710.png\" alt=\"The GitLab login screen\" class=\"wp-image-117744\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-login-screen-1024x710.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-login-screen-300x208.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-login-screen-150x104.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-login-screen-768x532.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-login-screen.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Hostinger users can create an account directly from hPanel by entering a new password during the <a href=\"https:\/\/support.hostinger.com\/en\/articles\/8583863-how-to-use-the-ubuntu-22-04-template-with-gitlab\" target=\"_blank\" rel=\"noopener\">GitLab template installation<\/a> process. To obtain or reset the login credentials, go to the Panel access tab on hPanel&rsquo;s VPS overview page.<\/p><?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-large\"><a href=\"\/uk\/vps-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner-1024x300.png\" alt=\"\" class=\"wp-image-77934\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/02\/VPS-hosting-banner.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/02\/VPS-hosting-banner-300x88.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/02\/VPS-hosting-banner-150x44.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/02\/VPS-hosting-banner-768x225.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><h3 class=\"wp-block-heading\" id=\"h-important-changing-external-url\">Important: Changing external URL<\/h3><p>Configuring several tools in GitLab requires communication between your local computer and its host server. If the address is incorrect, your VPS might become unreachable.<\/p><p>This issue commonly occurs if you self-host GitLab since this platform will address your server using its hostname by default. Sometimes, the hostname won&rsquo;t resolve to the corresponding IP address.<\/p><p>To avoid this error, assign your server&rsquo;s domain name or IP address to GitLab. Here&rsquo;s how to do so:<\/p><ol class=\"wp-block-list\">\n<li>Connect to your server <a href=\"\/uk\/tutorials\/how-to-use-putty-ssh\">using an SSH client like PuTTY<\/a>, terminal, or <strong>Hostinger Browser terminal<\/strong>.<\/li>\n\n\n\n<li>Open the GitLab configuration file using the following command:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo nano \/etc\/gitlab\/gitlab.rb<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>Find the <strong>external_url <\/strong>parameter, which is typically located at the bottom of the file.<\/li>\n\n\n\n<li>Replace the value with your server&rsquo;s IP address or domain name.<\/li>\n\n\n\n<li>Hit <strong>Ctrl + X<\/strong>, <strong>Y<\/strong>, and <strong>Enter<\/strong> to save the change.<\/li>\n\n\n\n<li>Reload your GitLab using the following command:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo gitlab-ctl reconfigure<\/pre><p>Wait a few minutes for the GitLab to reboot, and you should be able to access the dashboard.<\/p><h2 class=\"wp-block-heading\" id=\"h-navigating-gitlab\">Navigating GitLab<\/h2><p>Upon logging in to GitHub for the first time, you will see the main welcome screen, like the following. Here, you can find menus for basic tasks, like creating a new project and adding another user.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e0afda7a4c6\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"508\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/10\/gitlab-welcome-screen-1024x508.png\" alt=\"The GitLab welcome screen\" class=\"wp-image-117746\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-welcome-screen-1024x508.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-welcome-screen-300x149.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-welcome-screen-150x74.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-welcome-screen-768x381.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-welcome-screen.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>From the left sidebar, you can quickly jump to different menus by clicking on their buttons or searching them. If you can&rsquo;t find this side menu, put your cursor to the leftmost side of your screen or click the<strong> Keep sidebar visible<\/strong> toggle on the top left corner.<\/p><p>Let&rsquo;s create a new project by clicking the <strong>Create a Project <\/strong>button. Then, select how to populate the new project &ndash; import data from another platform manually or use the provided template. For now, create a blank one.<\/p><p>Enter the necessary details and click <strong>Create project<\/strong>. Add your project files by uploading them through the dashboard, creating new ones, or pushing existing Git repositories with commands. GitLab provides steps to do so in your new project&rsquo;s <strong>README<\/strong> file.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e0afda7af68\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"640\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/10\/instruction-for-adding-files-in-gitlab-readme-file-1024x640.png\" alt=\"The instruction for adding files in GitLab's README file\" class=\"wp-image-117747\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/instruction-for-adding-files-in-gitlab-readme-file-1024x640.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/instruction-for-adding-files-in-gitlab-readme-file-300x188.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/instruction-for-adding-files-in-gitlab-readme-file-150x94.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/instruction-for-adding-files-in-gitlab-readme-file-768x480.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/instruction-for-adding-files-in-gitlab-readme-file.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>One of the <a href=\"\/uk\/tutorials\/gitlab-best-practices\">best GitLab practices<\/a> when creating a project is structuring your files in a folder. You can also categorize multiple projects into a group, which is accessible only to team members with the correct permissions.<\/p><p>If you are inside a project, the sidebar will show menus for managing it. The most basic one is organizing the repository, like changing its name, adding a new icon, or setting new topic tags. You can adjust this information by going to the<strong> sidebar <\/strong>&rarr; <strong>Settings<\/strong> &rarr; <strong>General<\/strong>.<\/p><p><div><p class=\"important\"><strong>Important!<\/strong> Remember to create private repositories for your closed-source project since the public ones are accessible by all users online.<\/p><\/div>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-creating-merge-requests\">Creating merge requests<\/h2><p>Before pushing changes to a project&rsquo;s repository, developers will send a <strong>merge request<\/strong>. After the reviewer checks the proposed modifications, they will approve the requests, pushing the code into the main codebase.<\/p><p>In GitLab, you can create merge requests directly or based on an issue. We recommend setting up an issue first since it helps you easily check the changes and avoid further errors. Here&rsquo;s how to do so:<\/p><ol class=\"wp-block-list\">\n<li>Open your <strong>GitLab project <\/strong>&rarr; <strong>sidebar <\/strong>&rarr; <strong>Issues<\/strong>. Click <strong>New issue<\/strong>.<\/li>\n\n\n\n<li>Enter information about the issue, including the assignee, deadline, and labels. Click <strong>Create issue <\/strong>to confirm.<\/li>\n\n\n\n<li>Let&rsquo;s say you have worked on that issue and are ready to push the changes. Click <strong>Create merge request<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e0afda7bc7e\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"295\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/10\/merge-request-creation-button-in-a-gitlab-issue-1024x295.png\" alt=\"The merge request creation button in a GitLab issue\" class=\"wp-image-117748\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/merge-request-creation-button-in-a-gitlab-issue-1024x295.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/merge-request-creation-button-in-a-gitlab-issue-300x87.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/merge-request-creation-button-in-a-gitlab-issue-150x43.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/merge-request-creation-button-in-a-gitlab-issue-768x221.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/merge-request-creation-button-in-a-gitlab-issue.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"4\" class=\"wp-block-list\">\n<li>Enter information about the new request. Click <strong>Create merge request <\/strong>to confirm.&nbsp;<\/li>\n<\/ol><p>That&rsquo;s it. Note that you can only approve a merge request with at least a <a href=\"https:\/\/www.atlassian.com\/git\/tutorials\/saving-changes\/git-commit\" target=\"_blank\" rel=\"noopener\">commit<\/a>. Otherwise, you can only close it, leaving the issue unresolved.<\/p><p>If you set the commited change as a draft, mark it as ready first. Once GitLab shows a ready message, you can approve the request and merge the code by clicking their buttons.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e0afda7c829\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"680\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/10\/a-ready-to-merge-request-in-gitlab-1024x680.png\" alt=\"A ready-to-merge request in GitLab\" class=\"wp-image-117749\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/a-ready-to-merge-request-in-gitlab-1024x680.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/a-ready-to-merge-request-in-gitlab-300x199.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/a-ready-to-merge-request-in-gitlab-150x100.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/a-ready-to-merge-request-in-gitlab-768x510.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/a-ready-to-merge-request-in-gitlab.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Once the process is complete, GitLab will automatically close the issue and request. To reaccess it, go to the sidebar and click <strong>Issues<\/strong> or <strong>Requests<\/strong>, depending on what you want to check. Then, select the <strong>Closed <\/strong>tab.<\/p><h2 class=\"wp-block-heading\" id=\"h-using-gitlab-automation\">Using GitLab automation<\/h2><p>GitLab has a robust built-in feature that lets you configure a CI\/CD pipeline and runner for task automation.<\/p><p>To configure task automation, we need a runner &ndash; an agent that executes specific tasks, known as jobs, specified in your CI\/CD pipeline. To begin, install the <a href=\"https:\/\/docs.gitlab.com\/runner\/install\/\" target=\"_blank\" rel=\"noopener\">GitLab Runner utility<\/a> on your local machine.<\/p><p>The steps vary greatly depending on your operating system. For example, here&rsquo;s how to do so in Debian-based distros like <strong>Ubuntu<\/strong>:<\/p><ol class=\"wp-block-list\">\n<li>Access the <a href=\"https:\/\/s3.dualstack.us-east-1.amazonaws.com\/gitlab-runner-downloads\/latest\/index.html\" target=\"_blank\" rel=\"noopener\">GitLab Runner index<\/a> to find the latest filename and version.&nbsp;<\/li>\n\n\n\n<li>Open your local system&rsquo;s terminal by pressing <strong>Ctrl <\/strong>+ <strong>Alt <\/strong>+<strong> T<\/strong> or accessing it from the application launcher.&nbsp;<\/li>\n\n\n\n<li>Enter the following command. Replace the URL according to the filename you want to download:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo curl -LJO \"https:\/\/s3.dualstack.us-east-1.amazonaws.com\/gitlab-runner-downloads\/latest\/deb\/gitlab-runner_amd64.deb\"<\/pre><ol start=\"4\" class=\"wp-block-list\">\n<li>Make the new filename executable using the following command:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo chmod +x \/usr\/local\/bin\/gitlab-runner<\/pre><ol start=\"5\" class=\"wp-block-list\">\n<li>Run the following commands one by one to install and activate GitLab Runner:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">cd ~\n\ngitlab-runner install\n\ngitlab-runner start<\/pre><ol start=\"6\" class=\"wp-block-list\">\n<li>Restart your computer to apply the changes.&nbsp;<\/li>\n<\/ol><p><div><p class=\"important\"><strong>Important!<\/strong> When choosing the runner from the index, consider the CPU architecture code. For example, choose AMD64 if you are using a 64-bit processor. Meanwhile, download ARM64 if you use ARM-based chips like the Apple M series.<\/p><\/div>\n\n\n\n<\/p><p>Now, we can create a runner via the GitLab dashboard. To start, make a new blank project by navigating to the sidebar &rarr; <strong>Projects<\/strong> &rarr; <strong>New project<\/strong>.<\/p><p>Then, create a new file called <strong>.gitlab-ci.yml<\/strong>. It is where you will specify all the jobs and how the runners should act in a specific scenario, like an error. For example, we will add the following script to create a simple pipeline with two jobs &ndash; <strong>build<\/strong> and <strong>test<\/strong>:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">stages:\n\n&nbsp;&nbsp;- build\n\n&nbsp;&nbsp;- test\n\njob_build:\n\n&nbsp;&nbsp;stage: build\n\n&nbsp;&nbsp;script:\n\n&nbsp;&nbsp;&nbsp;&nbsp;- echo \"Building the project\"\n\njob_test:\n\n&nbsp;&nbsp;stage: test\n\n&nbsp;&nbsp;script:\n\n&nbsp;&nbsp;&nbsp;&nbsp;- echo \"Running tests\"<\/pre><p>Commit the changes. Note that the steps depend on whether you use the built-in integrated development environment (IDE) or the text editor. Once the GitLab pipeline setup is complete, we can proceed with the runner creation:<\/p><ol class=\"wp-block-list\">\n<li>From your project page, navigate to the <strong>sidebar<\/strong> &rarr; <strong>Settings<\/strong> &rarr; <strong>CI\/CD<\/strong>.&nbsp;<\/li>\n\n\n\n<li>Find the <strong>Runners<\/strong> section, click<strong> Expand<\/strong>, and hit <strong>New project runner<\/strong>.<\/li>\n\n\n\n<li>In the creation menu, enter the <strong>tags<\/strong> for your runner to assign which jobs it is responsible for. You can also assign untagged jobs by checking the<strong> Run untagged jobs<\/strong> box.<\/li>\n\n\n\n<li>Click<strong> Create runner<\/strong>.&nbsp;<\/li>\n\n\n\n<li>GitLab will redirect you to the runner registration page. Select your local system&rsquo;s operating system.<\/li>\n\n\n\n<li>Open your local system&rsquo;s command line. Enter the command you obtain from the GitLab runner configuration page, which might look like the following:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">gitlab-runner register&nbsp; --url http:\/\/hostname.com&nbsp; --token abc-defg123456<\/pre><ol start=\"7\" class=\"wp-block-list\">\n<li>Your command-line interface (CLI) will ask you to enter the GitLab instance URL. Hit <strong>Enter<\/strong> to use the default value, which is your server hostname.&nbsp;<\/li>\n\n\n\n<li>Add a description for your new runner. Hit <strong>Enter<\/strong>.<\/li>\n\n\n\n<li>Choose an <strong>executor<\/strong> &ndash; the tool that will handle your build process in different environments. We&rsquo;ll use <strong>shell<\/strong> as it is the default.&nbsp;<\/li>\n\n\n\n<li>Enter the following command to start the new runner:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">gitlab-runner run<\/pre><p>Return to GitLab, and you should see a message confirming that you have successfully set up a runner. If you go to your project <strong>sidebar<\/strong> &rarr;<strong> Settings<\/strong> &rarr;<strong> CI\/CD<\/strong> &rarr; <strong>Runners<\/strong>, the new runner will have a green dot indicating its online status.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e0afda7d6fe\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"338\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/10\/gitlab-confirmation-message-about-a-registered-runner-1024x338.png\" alt=\"GitLab's confirmation message about a registered runner\" class=\"wp-image-117750\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-confirmation-message-about-a-registered-runner-1024x338.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-confirmation-message-about-a-registered-runner-300x99.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-confirmation-message-about-a-registered-runner-150x50.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-confirmation-message-about-a-registered-runner-768x254.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-confirmation-message-about-a-registered-runner.png 1296w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"><div><p class=\"important\">&lt;strong&gt;Important!&lt;\/strong&gt;If the runner registration page is unreachable, check if your GitLab URL uses a hostname. If so, try replacing it with your server&rsquo;s IP address. If you encounter this issue, set your IP address or domain name as the default external URL.<\/p><\/div><\/pre><p>After setting up your CI\/CD pipeline and runner, check whether it works properly. To do so, go to your project dashboard &rarr; <strong>sidebar<\/strong> &rarr; <strong>Build<\/strong> &rarr; <strong>Pipelines<\/strong>. Select a job, and you should see the execution log.<\/p><h2 class=\"wp-block-heading\" id=\"h-managing-issues-and-milestones\">Managing issues and milestones<\/h2><p><strong>Issues<\/strong><\/p><p>Issues in GitLab are crucial for task division and setting up goals. There are different ways to create a new one, including the method we explained in the previous <strong>Creating merge request <\/strong>section.<\/p><p>You can also create one from another issue or incident. To do so, open an <strong>issue<\/strong>, click the <strong>three-dot icon <\/strong>on the top right, and click <strong>New related issue<\/strong>. Enter the required information and make sure to check the <strong>Relate to issue #<\/strong> box.<\/p><p>To change settings like the assignee, labels, deadlines, and confidentiality, simply open the issue and click the respective menu on the right sidebar. You can also do so in bulk by going to your project&rsquo;s<strong> sidebar <\/strong>&rarr; <strong>Plan<\/strong> &rarr;<strong> issue<\/strong> and clicking<strong> Bulk edit<\/strong> on the top right.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e0afda7e429\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"315\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/10\/gitlab-issue-boards-1024x315.png\" alt=\"GitLab issue boards' appearance\" class=\"wp-image-117751\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-issue-boards-1024x315.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-issue-boards-300x92.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-issue-boards-150x46.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-issue-boards-768x236.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-issue-boards.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>If your team members collaborate on a complex project with hundreds of issues, organize them using the <strong>Issue boards<\/strong>. On this page, GitLab classifies the issues based on their labels to simplify navigation.<\/p><p>From this board, you can also create an issue by clicking the <strong>plus<\/strong> button on the list. To organize issues, simply drag and drop them onto different columns.<\/p><p><strong>Milestone<\/strong><\/p><p>You can group issues and merge requests into a <strong>milestone <\/strong>to track the progress of a goal more easily. For example, you can set a milestone as a target to release a new feature, with the issues covering different services to integrate.<\/p><p>To create a milestone, open your project&rsquo;s <strong>sidebar<\/strong> &rarr; <strong>Plan<\/strong> &rarr;<strong> Milestones<\/strong> &rarr; <strong>New milestone<\/strong>. Enter its information, including the title, start date, and deadline. Click<strong> Create milestone<\/strong> to confirm.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e0afda7f24b\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"73\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/10\/milestone-in-a-gitlab-issue-1024x73.png\" alt=\"\" class=\"wp-image-117752\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/milestone-in-a-gitlab-issue-1024x73.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/milestone-in-a-gitlab-issue-300x21.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/milestone-in-a-gitlab-issue-150x11.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/milestone-in-a-gitlab-issue-768x55.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/milestone-in-a-gitlab-issue.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Now, open your issue and go to the <strong>Milestone <\/strong>menu on the right sidebar. Assign your new milestone, and its name should show up under the issues on the list or board.<\/p><h2 class=\"wp-block-heading\" id=\"h-most-common-gitlab-commands\">Most common GitLab commands<\/h2><p>Like other Git platforms, commands are essential for interacting with your GitLab project. For advanced users, these utilities let them manage repositories more efficiently without opening the GitLab web application.<\/p><p>Here are the most important <a href=\"\/uk\/tutorials\/basic-git-commands\">Git commands<\/a>:<\/p><ul class=\"wp-block-list\">\n<li><strong>Git commit<\/strong> &ndash; saves the changes you made as a snapshot called commit. Using the <strong>-m <\/strong>option, you can add a description of the modification.&nbsp;<\/li>\n\n\n\n<li><strong>Git clone<\/strong> &ndash; copies a specific repository and creates a new working directory containing all its data.&nbsp;<\/li>\n\n\n\n<li><strong>Git add <\/strong>&ndash; specifies the files to push during the next commit.&nbsp;<\/li>\n\n\n\n<li><strong>Git blame<\/strong> &ndash; shows the author who modified specific lines in a file.&nbsp;<\/li>\n\n\n\n<li><strong>Git branch<\/strong> &ndash; manages branches in your repository, including listing, deleting, creating, and renaming them.&nbsp;<\/li>\n\n\n\n<li><strong>Git merge<\/strong> &ndash; combines a new change from a branch to the main codebase.&nbsp;<\/li>\n\n\n\n<li><strong>Git fetch <\/strong>&ndash; updates your local repository without altering the current branch.<\/li>\n<\/ul><p>You can run these commands on various areas depending on your development environment. For example, execute them on your IDE terminal or local machine&rsquo;s command-line interface.<\/p><p>Remember, your system must have Git installed to use these commands. Windows users can set it up by <a href=\"https:\/\/git-scm.com\/downloads\/win\" target=\"_blank\" rel=\"noopener\">downloading and extracting the installer package<\/a> from the official website. Meanwhile, this software is pre-installed in most MacOS operating systems.<\/p><p>In Linux, <a href=\"\/uk\/tutorials\/how-to-install-git-on-ubuntu\">install Git<\/a> using your package manager command. For example, enter the following if you are using Ubuntu or other Debian-based distros:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt install git&nbsp;<\/pre><p>GitLab also has additional commands specifically for managing runners. The syntax looks as follows:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">gitlab-runner [task] [option]<\/pre><p>The acceptable tasks and their functions are:<\/p><ul class=\"wp-block-list\">\n<li><strong>Register<\/strong> &ndash; sets a runner active.<\/li>\n\n\n\n<li><strong>Start <\/strong>&ndash; enables a specific runner.<\/li>\n\n\n\n<li><strong>Stop <\/strong>&ndash; terminates a particular runner.<\/li>\n\n\n\n<li><strong>Unregister <\/strong>&ndash; disables a runner.&nbsp;<\/li>\n<\/ul><p>We recommend reading the <a href=\"https:\/\/docs.gitlab.com\/runner\/commands\/\" target=\"_blank\" rel=\"noopener\">GitLab Runner documentation<\/a> to learn more about the command usage. You can also check this utility&rsquo;s manual by running the following in your CLI:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">gitlab-runner --help<\/pre><h2 class=\"wp-block-heading\" id=\"h-advanced-gitlab-features\">Advanced GitLab features<\/h2><p>GitLab has several advanced features that can help you handle various tasks. Here are two of the most common ones.<\/p><h3 class=\"wp-block-heading\" id=\"h-integrating-webhooks-for-automation\">Integrating Webhooks for automation<\/h3><p><strong>Webhooks<\/strong> are HTTP callback functions that run when a specific event occurs. Unlike runners, you use them to automate more general tasks instead of complex jobs within your CI\/CD pipeline.<\/p><p>For example, you can set a webhook to trigger CI\/CD jobs, update issues, or deploy your applications to the live environment. Moreover, it lets you connect external applications, including alerting platforms like <strong>Twillo<\/strong>.<\/p><p>You can create a webhook for groups or projects using the same steps. Here&rsquo;s how to do so:<\/p><ol class=\"wp-block-list\">\n<li>Open your project or group and navigate to the<strong> sidebar<\/strong> &rarr; <strong>Settings <\/strong>&rarr; <strong>Webhooks<\/strong>.<\/li>\n\n\n\n<li>Click <strong>Add new webhook<\/strong>.<\/li>\n\n\n\n<li>Enter the <strong>webhook URL endpoint<\/strong>, which is obtainable from the platforms or services you want to connect.&nbsp;<\/li>\n\n\n\n<li>Enter information like the webhook name or description.&nbsp;<\/li>\n\n\n\n<li>In the <strong>Event<\/strong> section, check <a href=\"https:\/\/docs.gitlab.com\/ee\/user\/project\/integrations\/webhook_events.html\" target=\"_blank\" rel=\"noopener\">GitLab events<\/a> that your webhook will trigger.<\/li>\n\n\n\n<li>Click <strong>Add webhook <\/strong>to confirm.<\/li>\n<\/ol><p>Test the new webhook to ensure it works properly. To do so, open your <strong>project <\/strong>or <strong>group page <\/strong>and navigate to the<strong> sidebar<\/strong> &rarr; <strong>Settings<\/strong> &rarr; <strong>Webhooks<\/strong>. Scroll down to the list of webhooks. Click <strong>Test<\/strong> and select the type of event you want to trigger.<\/p><h3 class=\"wp-block-heading\" id=\"h-using-gitlab-pages-for-web-hosting\">Using GitLab Pages for web hosting<\/h3><p>The <strong>GitLab Pages<\/strong> platform lets you host a static site for free directly from your GitLab repository. It is excellent for simple projects with small traffic, like a portfolio website or public documentation.<\/p><p>You can host static pages written in plain HTML, CSS, and JavaScript. In addition, GitLab Pages support popular site generators, such as Jekyll, Hugo, and Gatsby.<\/p><p>Here are the steps to deploy a static site from your GitLab repository to GitLab Pages. Before proceeding, ensure you have <a href=\"\/uk\/tutorials\/how-to-install-docker-on-ubuntu\">installed <strong>Docker<\/strong><\/a><strong> <\/strong>and <a href=\"https:\/\/jekyllrb.com\/\" target=\"_blank\" rel=\"noopener\"><strong>Jekyll<\/strong><\/a>.<\/p><ol class=\"wp-block-list\">\n<li>Create a new blank project in GitLab.<\/li>\n\n\n\n<li>Add a new HTML file called <strong>index.html<\/strong> and populate it with your site content. For example, here&rsquo;s a basic page outline:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;html&gt;\n\n&nbsp;&lt;head&gt;\n\n&nbsp;&nbsp;&nbsp;&lt;title&gt;Home&lt;\/title&gt;\n\n&nbsp;&lt;\/head&gt;\n\n&nbsp;&lt;body&gt;\n\n&nbsp;&nbsp;&nbsp;&lt;h1&gt;Hello World!&lt;\/h1&gt;\n\n&nbsp;&lt;\/body&gt;\n\n&nbsp;&lt;\/html&gt;<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>Create a new <strong>gemfile.html <\/strong>file specifying <a href=\"https:\/\/www.ruby-lang.org\/en\/\" target=\"_blank\" rel=\"noopener\">Ruby<\/a> dependencies, which we will use to build this website. Here&rsquo;s how the file content looks like:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">source \"https:\/\/rubygems.org\"\n\ngem \"jekyll\"<\/pre><ol start=\"4\" class=\"wp-block-list\">\n<li>Make a .<strong>gitlab-ci.yml <\/strong>file containing the script for deploying and building the website. Here&rsquo;s an example:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">image: ruby:3.2\n\npages:\n\n&nbsp;&nbsp;script:\n\n&nbsp;&nbsp;&nbsp;&nbsp;- gem install bundler\n\n&nbsp;&nbsp;&nbsp;&nbsp;- bundle install\n\n&nbsp;&nbsp;&nbsp;&nbsp;- bundle exec jekyll build -d public\n\n&nbsp;&nbsp;artifacts:\n\n&nbsp;&nbsp;&nbsp;&nbsp;paths:\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- public<\/pre><ol start=\"5\" class=\"wp-block-list\">\n<li>Save and commit all the files.&nbsp;<\/li>\n\n\n\n<li>Go to your project <strong>sidebar &rarr; Settings &rarr; CI\/CD <\/strong>to create a runner for untagged jobs. Refer to the previous section if you are unsure how to do so.&nbsp;<\/li>\n\n\n\n<li>Go to <strong>Build<\/strong> &rarr; <strong>Pipeline<\/strong> &rarr;<strong> Run Pipeline<\/strong> to start your deployment pipeline.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e0afda80286\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"454\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/10\/gitlab-pipeline-log-1024x454.png\" alt=\"The GitLab pipeline log\" class=\"wp-image-117753\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-pipeline-log-1024x454.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-pipeline-log-300x133.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-pipeline-log-150x66.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-pipeline-log-768x340.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2024\/10\/gitlab-pipeline-log.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"8\" class=\"wp-block-list\">\n<li>Once the pipeline is completed, go to <strong>Deploy <\/strong>&rarr; <strong>Pages <\/strong>to obtain your GitLab Pages website&rsquo;s link.<\/li>\n<\/ol><p>If you want to modify your website later, simply commit the changes and push the new code to your repository. This will trigger the build and deployment script specified in the GitLab <strong>YAML<\/strong> file.<\/p><p>Check your pipeline status to see if GitLab has finished deploying the changes. Once the process is complete, your site should now update.<\/p><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>GitLab is a powerful platform that helps improve software development efficiency through version control and automation. This tool organizes your codebase and files into a repository called <strong>project<\/strong>, which you can create from the main dashboard.<\/p><p>To manage a project, navigate to the left sidebar and select the appropriate menu. For example, you can create an<strong> issue<\/strong> to define tasks and create a <strong>merge request<\/strong> to propose changes to your project files. Use the <strong>issue tracker<\/strong> to organize your tasks easily.<\/p><p>Moreover, you can set up a<strong> CI\/CD pipeline<\/strong> for automation by creating a <strong>runner<\/strong> and a <strong>YAML <\/strong>file. To improve your GitLab workflow efficiency, use Git commands to interact with your repository directly from your local machine&rsquo;s command-line interface.<\/p><p>GitLab also offers additional features that help handle other tasks. For example, <strong>webhooks <\/strong>integrate third-party tools and automate general tasks like alerting. Meanwhile, use<strong> GitLab Pages <\/strong>to deploy static pages directly from your repository.<\/p><h2 class=\"wp-block-heading\" id=\"h-gitlab-tutorial-faq\">GitLab Tutorial FAQ<\/h2><div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1729511971526\"><h3 class=\"schema-faq-question\">How do I create a GitLab account?<\/h3> <p class=\"schema-faq-answer\">To create an account, open the <a href=\"https:\/\/gitlab.com\/users\/sign_up\" target=\"_blank\" rel=\"noopener\">GitLab sign-up page<\/a>. Enter details like your name, email address, and password. Then, click <strong>Continue<\/strong> to finish. If you set up your GitLab repository using <strong>Hostinger&rsquo;s VPS template<\/strong>, simply enter a panel password, and our system will create the account.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1729511976945\"><h3 class=\"schema-faq-question\">What are GitLab repositories?<\/h3> <p class=\"schema-faq-answer\">In Git platforms, repositories are centralized storage for your project&rsquo;s code, files, data, and version control history. Specifically for GitLab, a repository and project are interchangeable. That said, a project commonly refers to a more general storage containing additional data like issues.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1729511982419\"><h3 class=\"schema-faq-question\">How can I manage branches in GitLab?<\/h3> <p class=\"schema-faq-answer\">To manage branches in GitLab, open the project in question and navigate to the <strong>sidebar <\/strong>&rarr; <strong>Code<\/strong> &rarr;<strong> Branches<\/strong>. From this menu, you can check, create, or delete branches. Since other management options are on different menus, we recommend checking the <a href=\"https:\/\/docs.gitlab.com\/ee\/user\/project\/repository\/branches\/\" target=\"_blank\" rel=\"noopener\">GitLab Branch documentation page<\/a>.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1729511989905\"><h3 class=\"schema-faq-question\">What is an issue tracker in GitLab?<\/h3> <p class=\"schema-faq-answer\">The GitLab issue tracking feature lets you check all tasks in your project, including ongoing and completed ones. You can also see their important information, like the deadlines. Moreover, the issue tracker lets you organize tasks based on their status or tags for a more efficient workflow.&nbsp;<\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>GitLab is a powerful Git repository platform that helps improve development efficiency through version control, branching, as well as continuous integration and continuous delivery (CI\/CD). In this GitLab tutorial, we will explain all about this platform. We will show you how to navigate its dashboard, set up a CI\/CD pipeline, and use commands for different [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/uk\/tutorials\/gitlab-tutorial\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":337,"featured_media":117741,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"GitLab tutorial: Set up projects and pipelines","rank_math_description":"Learn how to use GitLab for project management, set up your first CI\/CD pipeline, and automate tasks with this step-by-step GitLab tutorial.","rank_math_focus_keyword":"gitlab tutorial","footnotes":""},"categories":[22642,22640],"tags":[],"class_list":["post-117739","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pre-installed-applications","category-vps"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/gitlab-tutorial","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/tutoriel-gitlab","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/gitlab-tutorial","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/gitlab-tutorial","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/gitlab-tutorial","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/gitlab-tutorial","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/gitlab-tutorial","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/gitlab-tutorial","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/gitlab-tutorial","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/posts\/117739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/users\/337"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/comments?post=117739"}],"version-history":[{"count":8,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/posts\/117739\/revisions"}],"predecessor-version":[{"id":118584,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/posts\/117739\/revisions\/118584"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/media\/117741"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/media?parent=117739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/categories?post=117739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/tags?post=117739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}