issues with gitolite mirroring using gerrit

167 views
Skip to first unread message

rj

unread,
Jun 3, 2015, 8:16:10 PM6/3/15
to gito...@googlegroups.com

As we are looking for a solution of authorizing users based on their public keys and not with Unix posix permission at remote sites looking at using gerrit gitolite combo setup

scenario

1. User clones from gitolite (repo @all R)

2.pushes to gerrit for code review

3.gerrit updates changes to repository

4. gerrit "ref-updated" hook triggers "gitolite mirror push $slave $push" function to mirror different sites


The above above scenario works if the "gitolite setup" has been run or the repository entry is present under gitolite.conf file with out any issue


But

As I am only looking to have below entry under gitolite.conf file

repo gitolite-admin

RW = @admins

repo @all

R = @all


and the repositories are being created by gerrit or manually under "repositories path"

looking a way to force push/mirror the repository to remote sites , if we are able to scan using "gitolite list-phy-repos"


as observing below error messages when using

git-config -r $project mirror.slave and gitolite mirror push $slave $project"


error messages

2015-06-03.16:42:34 33650 mirror: fatal: 'repositories/test1.git' does not appear to be a git repository
2015-06-03.16:42:34 33650 mirror: fatal: Could not read from remote repository.
2015-06-03.16:42:34 33650 mirror:
2015-06-03.16:42:34 33650 mirror: Please make sure you have the correct access rights
2015-06-03.16:42:34 33650 mirror: and the repository exists.
2015-06-03.16:42:34 33649 system() failed,gitolite/src/commands/mirror,push,rmegitban,test1,-> 256





Thanks in advance
rj




Sitaram Chamarty

unread,
Jun 3, 2015, 8:29:26 PM6/3/15
to rj, gito...@googlegroups.com
Why are you using gitolite at all? Anyone whose gitolite.conf is
basically "repo @all <newline> R = @all" doesn't really need it.

Gitolite's mirroring looks very complex but the actual mirroring is just
"git push --mirror ...". Just put that in your gerrit script and be done.

Vacelet, Manuel

unread,
Jun 4, 2015, 3:07:54 AM6/4/15
to rj, gitolite
On Thu, Jun 4, 2015 at 2:16 AM, rj <jsrrav...@gmail.com> wrote:

As we are looking for a solution of authorizing users based on their public keys and not with Unix posix permission at remote sites looking at using gerrit gitolite combo setup

scenario

1. User clones from gitolite (repo @all R)

2.pushes to gerrit for code review

3.gerrit updates changes to repository

4. gerrit "ref-updated" hook triggers "gitolite mirror push $slave $push" function to mirror different sites


You can avoid this step if you rely on gerrit replication plugin.
We are using it in Tuleap for gerrit -> gitolite transfer and it works like a charm.

Manuel
 

rj

unread,
Jun 4, 2015, 10:38:29 AM6/4/15
to gito...@googlegroups.com

Manuel,

How are remote users getting authorized when they clone from remote/mirrored servers as would not like to enable "git daemon" on machines and use only ssh protocol

As per the replication plugin , observed issues when we have "update" sym link hook created by gitolite .


Sitaram,

you are true , but for now we are looking at read from gitolite -> push to gerrrit for code review from users


Thanks
RJ
Reply all
Reply to author
Forward
0 new messages