How to create GitLab repositories on your own server
GitLab is one of the most popular GIT repository providers in the world, but did you know that you can install GitLab software on your own server and start hosting your projects completely privately at no cost?
To install GitLab on your own server, you just have to follow these steps:
1. Access your server via SSH
Remember that you will need root privileges to be able to install GitLab successfully.
2. Install the necessary dependencies
Remember to update the package list before proceeding with the installation of the packages.
apt-get update
Next:
apt-get install curl openssh-server ca-certificates
3. Install the Postfix mail server, if you wish to send emails from the server itself
Run the following command:
apt-get install postfix
4. Download the GitLab repository package and add it to your repository list
In this step, you will download an executable script directly from the GitLab page:
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash
5. Proceed with the GitLab installation
In this case, it will be necessary for you to specify the URL that GitLab should respond to. Replace the text between braces with your own URL:
EXTERNAL_URL='http://{gitlab.tudominio.com}' apt-get install gitlab-ee
6. Configure GitLab from the web interface and finish the configuration
That's it! Now, you just need to visit the URL you specified (remember to modify your DNS records) and proceed with the GitLab installer.
success With these simple steps, you will be able to enjoy your own completely private repository service on your own server.