007. gitlab仓库管理
生活随笔
收集整理的這篇文章主要介紹了
007. gitlab仓库管理
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1. gitlab創建組
創建后:
組管理:
組創建完成后,開始創建用戶
2. gtilab創建用戶
這里無法直接創建密碼,需要創建用戶后在對用戶進行操作修改密碼
密碼和權限設置,取消和開啟創建組權限
通過模擬用戶來查看用戶權限
模擬權限:
每次模擬完權限后,用戶默認就切換到了所模擬的用戶,需要退出后重新登錄root才好
3. 添加用戶到組
創建用戶和組后,需要將用戶添加到組后,用戶才可以對所在組下的項目進行操作.
組權限有5種.下面是這5種權限的區別.期中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 | * | * |
由于是給dev 開發用戶,這里選擇 Developer 即可
gitlab創建倉庫
這里我們創建一個 leilei_test 私有的倉庫
如何使用倉庫
1. git全局配置
git config --global user.name "Administrator"
git config --global user.email "admin@example.com"
2. 創建一個新的存儲庫
git clone git@10.0.0.63:root/leilei_test.git
cd leilei_test
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
3. 利用現有文件夾
cd [文件夾]
git init
git remote add origin git@10.0.0.63:root/leilei_test.git
git add .
git commit -m "Initial commit"
git push -u origin master
4.利用已存在的現有倉庫
cd existing_repo
git remote rename origin old-origin
git remote add origin git@10.0.0.63:root/leilei_test.git
git push -u origin --all
git push -u origin --tags
5.倉庫加入組,讓所在組的用戶可以管理對應組
模擬查看:
至此, 新建倉庫,用戶,組,倉庫授權給組,組里的用戶可以訪問組下的倉庫.
創建倉庫
創建組
創建用戶
用戶添加到組
組和倉庫權限配置
模擬用戶登錄查看權限.
.zstitle { 280px; text-align: center; font-size: 16px }
.zsimgweixin { 280px }
.zsimgali { 280px; padding: 0px 0px 50px 0px }
.zsleft { float: left }
.zsdiv { display: flex; justify-content: center;}
.zs { font-size: 26px }
.zspaddingright { padding: 0px 100px 0px 0px }
微信贊賞
支付寶贊賞
總結
以上是生活随笔為你收集整理的007. gitlab仓库管理的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: wordpress漏洞_用软件工具扫描W
- 下一篇: 矩阵乘法(五):置换