问题
I was set git server with gitolite and I have finished it Now. But One question truble me. I am set gitolite with both ssh
and http
mode.
I use the gitolite-admin.conf
to control the repo and user's auth. I followed the instruction: modify the conf, git add it, git commit it and git push it. But It does't work.
In Client I can't clone the new repo I have add in the conf
this is my conf
the default repo 'testing' is working regularly
回答1:
That is because gitolite honors gitolite.conf
very strictly. You need to specify these lines in the conf file
repo @all
RW+ = @all
This will allow you to do operations on all the repos. But, you need to understand that when you specify @all
in repo
section, that means every repo falls in this rule. So, even if you have something like this in the file:
repo foo
R = xyz
gitolite ignores it because it sees that the repo foo
belongs to @all
. So, in order for clone operation to work, you need to specify READ
permission to all the repos, something like this:
repo @all
R = @all
And then you need to add all the permissions to the other repos as well, otherwise you will only be allowed to read the other repos and not write them.
来源:https://stackoverflow.com/questions/34897418/gitolite-admin-conf-doesnt-work