Installation instructions for gitlab in Ubuntu

First come to the official website: Installation Instructions Page[1].

Then click the Ubuntu installation process. After entering, follow the first step to run the command. The Ubuntu version used here is 18.04.

gitlab configuration

After configuring the first step, it is best not to run the second step command. The second step is to install gitlab through the command line. This is very slow. So you can download the installation package manually from this URL:

https://packages.gitlab.com/gitlab/gitlab-ce/[2]

Choose a version of Ubuntu to download. After clicking in, the download button is in the upper right corner. Don't forget to check MD5 or SHA1 after downloading. The following is the verification command (just open the terminal and run).

Go to the installation package directory. Open the terminal and enter:

Other verification commands:

After checking, you can install it.

Of course, if you just want to use commands to install gitlab, follow the instructions and operations in the second step. Just note that when installing by running the command, the gitlab-ee in the command should be changed to gitlab-ce. In gitlab, the installation package at the end of ee is a paid version, while ce You can try it for free.

After the above operations are completed, run the gitlab-ctl reconfigure command. After this command runs, it will take some time, and there will be multiple action prompts in the middle, don't worry about it.

After the above command is finished, run gitlab-ctl start to start the local service. Then use the ifconfig command to view the local IP address (you may be asked to install net-tools first), and then enter the local IP address on the browser, and you will come to the gitlab login interface.

gitlab local login page

This page prompts you to change your password. The two passwords must be consistent. Then you will be asked to enter your email or username and password (the password here is the one you just set), and you can log in to gitlab.

The usage of gitlab is very similar to that of github. The difference is that gitlab can create groups, which is equivalent to a development team, and many projects can be created in one group. When developing in a team, the group or project should select Internal as the visibility level.

gitlab visibility level

Of course, you can use gitlab to create private repositories and add group members or project members.

It should be noted that an error may be reported when using the git push operation. The reason is that the hostname cannot be resolved. The reason is that the default hostname of gitlab is http://gitlab.example.com. We need to modify the hostname to be the address of the machine.

git push -u origin master

In this case, you first need to close the gitlab-ctl service.

Then use the vi command to open this file: /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml. Modify host to be the IP address of the machine:

Modify gitlab host

Then restart the service gitlab-ctl start.

Then go to the local webpage, refresh the warehouse address, and add a new address (using git remote add origin new warehouse address). In this way, you can push into the warehouse file.

If it still does not work, it is likely that the following situation has been encountered:

After entering the login password, a feedback of Permission denied, please try again. appears.

This is because the server-side SSH service is configured with a policy that prohibits root users from logging in. Related policies can improve the security of the server, so you need to weigh security and ease of use, and then determine whether you need to modify the relevant configuration. . Need to modify the /etc/ssh/sshd_config file, change /etc/ssh/sshd_config to yes.

Then remove the # before PasswordAuthentication. After saving the file, use service ssh restart to restart the service. In this way, you can use the push operation (you can only switch to a super user to perform the push operation).

The above content configures the gitlab environment.

Reference materials

[1]

Installation instructions page: https://about.gitlab.com/install/

[2]

gitlab download page: https://packages.gitlab.com/gitlab/gitlab-ce/

Recommended Posts

Installation instructions for gitlab in Ubuntu
Installation, configuration and uninstallation of GitLab in Ubuntu19.1
Happy installation of Jenkins in ubuntu
Docker CE for Ubuntu installation notes
Set UTF-8 encoding for MySQL5.7 in Ubuntu 16.04
Installation and deployment of Nginx in Ubuntu
Graphical tutorial for installing Pycharm 2020.1 in Ubuntu 20.04
UBUNTU 16.04 installation diary
ubuntu 1804 installation details
Ubuntu system installation
Ubuntu installation record
ubuntu 18.04 installation (UEFI+GBT)
ubuntu installation error
Installation and use of SSH in Ubuntu environment
Install mysql-pytho in Ubuntu
Nagios3 in ubuntu serve
Some tips for viewing kernel repair information in ubuntu
Ubuntu16.04 installation partition settings
ubuntu redis php installation
Ubuntu offline installation package
Use supervisor in ubuntu
Ubuntu introduction and installation
ubuntu nice font installation
LNMP installation under Ubuntu
Installation and simple practice of MySQL in ubuntu environment (1)
Install python in Ubuntu
Install JDK in Ubuntu19.10
Ubuntu CEPH quick installation
foreman ubuntu16 quick installation
Ubuntu 17.10 installation toss record
Common exceptions and solutions for Ubuntu system installation and configuration
Ubuntu dual system installation
Tutorial for setting up FTP server in Ubuntu 16.04 environment
Installation and usage instructions of rz/sz command under ubuntu
Interesting applications that can be used for teaching in ubuntu16.04
Detailed steps for installing Django under Python 3.6 in Ubuntu 16.04 environment
Github Project-OpenPose installation on Ubuntu
Install VMware Tools in Ubuntu 18.04
Use of Anaconda in Ubuntu
ubuntu view python installation path
Ubuntu16.04 installation and simple configuration
Detailed ubuntu 20.04 LTS installation record
ubuntu install and configure GitLab
GitLab installation and basic use
CSI Tools installation Intel 5300 + Ubuntu 14.04
ubuntu19.04 installation tutorial (graphic steps)
Core dump debugging in ubuntu
Ubuntu PostgreSQL installation and configuration
ubuntu offline installation python environment
Ubuntu16.04 build GitLab server tutorial
Detailed explanation of the installation and use of SSH in the Ubuntu environment