jszwedko
jszwedko

Reputation: 63

Setting up personal branch permissions using gitolite

I'm having some issues getting personal 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/.*',
'-'
]
],

Upvotes: 1

Views: 3257

Answers (2)

VonC
VonC

Reputation: 1329572

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.

Upvotes: 1

jszwedko
jszwedko

Reputation: 63

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.

Upvotes: 2

Related Questions