Gitlab管理使用者、組、許可權(一)
阿新 • • 發佈:2019-01-01
&& 內容:
- 新增使用者
- 建立組
- 使用者許可權
- 保護主要分支
- 配置專案的可見性
- 移除使用者
一. 新增使用者
1. 用root 管理員登陸。
2. 點選管理區域
3. 點選New User
4. 輸入使用者相關資訊
5. 使用者會收到郵件如下畫面,點選設定密碼即可。
排錯小技巧:在設定郵件伺服器比如設定如下:
gitlab_rails['gitlab_email_from'] = '[email protected]'
gitlab_rails['gitlab_email_reply_to'] = '[email protected]'
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.mxhichina.com"
gitlab_rails['smtp_port'] = 25
gitlab_rails['smtp_user_name'] = "[email protected]"
gitlab_rails['smtp_password'] = "W-123456"
gitlab_rails['smtp_domain'] = "mxhichina.com"
gitlab_rails['smtp_authentication'] = "login"
設定 完成後執行以下命令測試:
gitlab-rails console
Notify.test_email('[email protected]', 'Message Subject', 'Message Body').deliver_now
二. 建立組
1. 使用管理員登陸gitlab伺服器。
2. 點選管理區域—Group-Add group
3. 依次填入組路徑,名稱和描述等資訊
4. 在如下畫面選擇使用者加入到剛建立的組、許可權等 。
三. 使用者許可權
1. 使用管理員開啟要設定許可權的專案。
2. 點選【Settings】--【Members】
3. 新增完成後,如下圖所示
4. 下表完整的列出了Guest,Reporter,Developer,Master,Owner對應的許可權。
Guest | Reporter | Developer | Master | Owner | |
Create new issues | * | * | * | * | * |
Leave comments | * | * | * | * | * |
Pull the project code | * | * | * | * | |
Download a project | * | * | * | * | |
Create code snippets | * | * | * | * | |
Create new merge requests | * | * | * | ||
Push changes to nonprotected branches | * | * | * | ||
Remove nonprotected branches | * | * | * | ||
Add tags | * | * | * | ||
Write a wiki | * | * | * | ||
Manage the issue tracker | * | * | * | ||
Add new team members | * | * | |||
Push changes to protected branches | * | * | |||
Manage the branch protection | * | * | |||
Manage Git tags | * | * | |||
Edit the project | * | * | |||
Add deploy keys to the project | * | * | |||
Configure the project hooks | * | * |