开发者

Setting up personal branch permissions using gitolite

开发者 https://www.devze.com 2023-02-17 12:45 出处:网络
I\'m having some issues getting perso开发者_开发百科nal branch permissions set up using gitolite.

I'm having some issues getting perso开发者_开发百科nal branch permissions set up using gitolite.

gitolite.conf:

repo    ulul
RW+     =   @admins
RW+ personal/USER/      =   @devs
R       =   @devs
- = @devs

Error message (when pushing): W refs/heads/jesse jesse DENIED by refs/.*

Relevant piece from the compiled gitolite file: 'jesse' => [

[

8,

'refs/.*',

'R'

],

[

16,

"refs/heads/personal/$gl_user/",

'RW+'

],

[

24,

'refs/.*',

'-'

]

],


Figured it out. Turns out the personal/USER/ is just the namespace; so creating branches like personal/jesse/main works fine. Hope this helps future gitolite users.


To detail your own answer, the important part is:

"refs/heads/personal/$gl_user/"

$gl_user is the variable set after the name passed in parameter of the scripts called ssh in its forced command mechanism.
That name is the one of the public key registered through gitolite.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号