1、用root管理員登陸,點(diǎn)擊管理區(qū)域
2、點(diǎn)擊New User,并輸入相關(guān)的信息。
3、點(diǎn)擊確定后輸入相關(guān)的密碼
(二)、創(chuàng)建組
1、點(diǎn)擊管理區(qū)域,選擇組
2、依次編輯相關(guān)的賬號(hào)信息
3、編輯組,并添加相應(yīng)的用戶
可以通過輸入名字選擇要分配權(quán)限的小組成員,然后分配角色,選擇權(quán)限有效時(shí)間,點(diǎn)擊Add to Project就把人員拉近到項(xiàng)目中。GitLab的角色有以下四種:
Guest:可以創(chuàng)建issue、發(fā)表評(píng)論,不能讀寫版本庫
Reporter:可以克隆代碼,不能提交,可以賦予測試、產(chǎn)品經(jīng)理此權(quán)限
Developer:可以克隆代碼、開發(fā)、提交、push,可以賦予開發(fā)人員此權(quán)限
MainMaster:可以創(chuàng)建項(xiàng)目、添加tag、保護(hù)分支、添加項(xiàng)目成員、編輯項(xiàng)目,一般GitLab管理員或者CTO才有此權(quán)限
(三)、創(chuàng)建項(xiàng)目并分配相關(guān)的權(quán)限
1、單擊項(xiàng)目,并創(chuàng)建項(xiàng)目
2、給該項(xiàng)目選擇成員或組,并分配相應(yīng)的角色。具體如下,進(jìn)入項(xiàng)目—setting—members—指定用戶或組分配權(quán)限和角色—-最后添加到項(xiàng)目中。
3、查看相關(guān)的權(quán)限
后續(xù):強(qiáng)制禁用gitlab的雙因子認(rèn)證:Two-Factor Authentication,如果不禁用的話,什么都做不成。
具體解決方法如下:
1、查看gitlab安裝時(shí)的postgresql的相關(guān)信息
[root@otrs004097 ~]# cat /var/opt/gitlab/gitlab-rails/etc/database.yml
# This file is managed by gitlab-ctl. Manual changes will be
# erased! To change the contents below, edit /etc/gitlab/gitlab.rb
# and run `sudo gitlab-ctl reconfigure`.
production:
adapter: postgresql
encoding: unicode
collation:
database: gitlabhq_production
pool: 10
host: /var/opt/gitlab/postgresql
port: 5432
socket:
sslmode:
sslcompression: 0
sslrootcert:
sslca:
load_balancing: {hosts:[]}
prepared_statements: false
statements_limit: 1000
fdw:
2、連接到gitlabhq_production庫
[root@otrs004097 ~]# su - gitlab-psql
Last login: Tue Nov 26 15:21:31 CST 2019 on pts/0
-sh-4.2$ psql -h /var/opt/gitlab/postgresql -d gitlabhq_production
psql (10.9)
Type help for help.
gitlabhq_production=# \\\\l
gitlabhq_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
更多關(guān)于云服務(wù)器,域名注冊(cè),虛擬主機(jī)的問題,請(qǐng)?jiān)L問西部數(shù)碼官網(wǎng):m.ps-sw.cn