Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Distribution and Management of users, groups and permissions in Gitlab (2)

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

(1). Add users

1. Log in with the root administrator and click on the management area

2. Click New User and enter the relevant information.

3. Enter the relevant password after clicking OK.

(2) create a group

1. Click the management area and select a group.

2. Edit the relevant account information in turn

3. Edit the group and add the appropriate users

You can select the team members to which you want to assign permissions by entering their names, then assign roles, select how long the permissions are valid, and click Add to Project to bring people closer to the project. There are four roles for GitLab:

Guest: you can create issue, post comments, and cannot read or write version libraries

Reporter: code can be cloned and cannot be submitted. This permission can be given to test and product managers.

Developer: you can clone code, develop, submit, push, and give developers this permission

MainMaster: you can create projects, add tag, protect branches, add project members, and edit projects. Only GitLab administrators or CTO have this permission.

(3) create a project and assign relevant permissions

1. Click the project and create the project

2. Select a member or group for the project and assign the corresponding role. As follows, enter the project-setting---members--- specifies the user or group to assign permissions and roles-and finally add it to the project.

3. View relevant permissions

Follow-up: forcibly disable gitlab's two-factor authentication: Two-Factor Authentication, if not disabled, nothing can be done.

The specific solutions are as follows:

1. View the information about postgresql when gitlab is installed

[root@otrs004097 ~] # cat / var/opt/gitlab/gitlab-rails/etc/database.yml # This file is managed by gitlab-ctl. Manual changes will be# erased! Production: adapter: postgresql encoding: unicode collation: database: gitlabhq_production pool: 10 username: "gitlab" password: host: "/ var/opt/gitlab/postgresql" port: 5432 socket: sslmode: sslcompression: 0 sslrootcert: sslca: load_balancing: {"hosts": []} prepared_statements: false statements_limit: 1000 fdw:

2. Connect to the gitlabhq_ production library

[root@otrs004097] # su-gitlab-psqlLast login: Tue Nov 26 15:21:31 CST 2019 on pts/0-sh-4.2$ psql-h / var/opt/gitlab/postgresql-d gitlabhq_productionpsql Type "help" for help.gitlabhq_production=#\ lgitlabhq_production=# SELECT name,username,otp_required_for_login,two_factor_grace_period, require_two_factor_authentication_from_group FROM users Name | username | otp_required_for_login | two_factor_grace_period | require_two_factor_authentication_from_group-+ -- yw | yw | f | 48 | f lqb | lqb | f | 48 | t ops | yunwei | | f | 48 | f dev | dev1 | f | 48 | f test | test1 | f | 48 | f Administrator | root | f | | 48 | f (6 rows) gitlabhq_production=# UPDATE users set require_two_factor_authentication_from_group ='f 'WHERE username =' root' UPDATE 1

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report