- Gitolite Essentials
- Sitaram Chamarty
- 275字
- 2021-07-16 12:10:04
Access Control example with Gitolite
We will see how simple Access Control can be with Gitolite. First, here's an example where the junior developers (let's call them Alice and Bob here) should be prevented from rewinding or deleting any branches, while the senior developers (Carol and David) are allowed to do so:
repo foo RW = alice bob RW+ = carol david
You probably guessed that the RW
stands for read and write. The +
in the second rule stands for force, just as it does in the push
command, and allows you to rewind or delete a branch.
Now, suppose we want the junior developers to have some specific set of branches that they should be allowed to rewind or delete, a sort of "sandbox", if you will. The following command will help you to implement that:
RW+ sandbox/ = alice bob
Alice and Bob can now push, rewind, or delete any branches whose names start with sandbox/
.
Access Control at the repository level is even easier, and you may even have guessed what that looks like:
repo foo RW+ = alice R = bob repo bar RW+ = bob R = alice repo baz RW+ = carol R = alice bob
As you can see, you have three users with different access permissions for each of the three repositories. Doing this using the file systems' permissions mechanisms or POSIX ACLs would be doable, but quite cumbersome to set up and to audit/review.
- 集成架構(gòu)中型系統(tǒng)
- 腦動力:Linux指令速查效率手冊
- 自動控制工程設(shè)計入門
- PIC單片機C語言非常入門與視頻演練
- Zabbix Network Monitoring(Second Edition)
- 計算機網(wǎng)絡(luò)技術(shù)實訓(xùn)
- C語言寶典
- 完全掌握AutoCAD 2008中文版:機械篇
- 聊天機器人:入門、進階與實戰(zhàn)
- 生成對抗網(wǎng)絡(luò)項目實戰(zhàn)
- 傳感器原理與工程應(yīng)用
- Xilinx FPGA高級設(shè)計及應(yīng)用
- 電氣控制及Micro800 PLC程序設(shè)計
- 歐姆龍PLC應(yīng)用系統(tǒng)設(shè)計實例精解
- 7天精通Photoshop CS5平面視覺設(shè)計