GitLab

Introduction to GitLab

Reprint link

GitLab is an open source version management system using Ruby on Rails to implement a self-hosted Git project repository that can access public or private projects through a web interface. It has similar functionality to Github, with the ability to browse source code, manage bugs and comments. It manages the team's access to the repository, it is very easy to browse committed versions and provides a file history repository. Team members can communicate using the built-in simple chat program (Wall). It also provides a code snippet collection function to easily reuse code and find it later when needed.


GitLab installation


We use Docker to install and run the Chinese version of GitLab. Since the new version has many problems, here we use the relatively stable version 10.5. The docker-compose.ymlconfiguration is as follows:

version: '3'
services:
    web:
      image: 'twang2218/gitlab-ce-zh:9.4'
      restart: always
      hostname: '192.168.75.145'
      environment:
        TZ: 'Asia/Shanghai'
        GITLAB_OMNIBUS_CONFIG: |
          external_url 'http://192.168.75.145:8080'
          gitlab_rails['gitlab_shell_ssh_port'] = 2222
          unicorn['port'] = 8888
          nginx['listen_port'] = 8080
      ports:
        - '8080:8080'
        - '8443:443'
        - '2222:22'
      volumes:
        - /usr/local/docker/gitlab/config:/etc/gitlab
        - /usr/local/docker/gitlab/data:/var/opt/gitlab
        - /usr/local/docker/gitlab/logs:/var/log/gitlab

Work after installation

  • Access address: http://ip:8080
    • The port 8080 is because the external access address I set in the configuration is 8080, the default is 80
  • After the initial installation is completed, the effect is as follows:

  • Set the administrator's initial password, the password here is preferably a combination of letters + numbers, and is greater than or equal to 8 digits
  • After the configuration is complete, log in, the administrator account is root

Note: If the server configuration is low, it may take a long time to start running, please be patient

GitLab settings


When you use it for the first time, you need to do some initial settings, click "Management Area" --> "Settings"

Account and Restriction Settings

Turn off the avatar function. Since the Gravatar avatar is a network avatar, it may cause a freeze when accessing when the network conditions are not ideal.

Registration Restrictions

Since it is an internal code hosting server, the registration function can be turned off directly, and the administrator can create users uniformly

GitLab account


When using, please do not operate directly through the root user. You need to create a user first, and then operate through the created user. If you are an administrator, you need to assign accounts to other developers.

create user

Click "Administration Area" --> "New User"

Set up account information

You can also set yourself as an administrator

Modify user password

Since we did not configure the mailbox when we created it, we also need to re-edit the user information and manually set the password

Sign out and sign in with a new account

Note: After creating an account, you will be prompted to change the login password when you log in for the first time.


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325345121&siteId=291194637