0

The server which I deploied Gerrit's OS is Ubuntu 18.04.05, and my Gitlab server's IP address is 192.168.0.167. I tried using replication plugin to push gerrit project to local Gitlab server. My gerrit_site/etc/replication.config file likes below:

[remote "test_project"]     url = [email protected]:testuser/test_project.git     push = +refs/heads/*:refs/heads/*     push = +refs/tags/*:refs/tags/*     push = +refs/changes/*:refs/changes/*     threads = 3     project = test_project 

And I tried reloading replication plugin by below command:

ssh -l gerrit_admin -p 29418 127.0.0.1 gerrit plugin reload replication 

And I got below error:

fatal: Unable to provision, see the following errors: 1) [Guice/ErrorInjectingConstructor]: ConfigInvalidException: remote.test_project.url "[email protected]:testuser/test_project.git" lacks ${name} placeholder in FileBasedConfig[/home/gerrit/gerrit_site/etc/replication.config]   at DestinationsCollection.<init>(DestinationsCollection.java:72)   at DestinationsCollection.class(DestinationsCollection.java:50)   while locating DestinationsCollection   while locating ReplicationDestinations Learn more:   https://github.com/google/guice/wiki/ERROR_INJECTING_CONSTRUCTOR 1 error ====================== Full classname legend: ====================== ConfigInvalidException:  "org.eclipse.jgit.errors.ConfigInvalidException" DestinationsCollection:  "com.googlesource.gerrit.plugins.replication.DestinationsCollection" ReplicationDestinations: "com.googlesource.gerrit.plugins.replication.ReplicationDestinations" ======================== End of classname legend: ======================== 

I wonder if I forgot any configurations? Or have any misunderstanding with official document?
I remember when I install plugin OAuth, I need to add a [plugin "gerrit-oauth"] section in gerrit_site/etc/gerrit.config. But the replication's document has no mention about this. Dose replication's document think I have already done it by default? If so, how should I modify gerrit_site/etc/gerrit.config?

1 Answer 1

0

I have same issues rencently. You can check your replication.config, probably replication.config have duplicate remote name items, like below, these two items have same name.

Solution: rename the duplicate items to an unique name.

[remote "test_project"]     url = [email protected]:testuser/test_project.git     push = +refs/heads/*:refs/heads/*     push = +refs/tags/*:refs/tags/*     push = +refs/changes/*:refs/changes/*     threads = 3     project = test_project [remote "test_project"]     url = [email protected]:testuser/another.git     push = +refs/heads/*:refs/heads/*     push = +refs/tags/*:refs/tags/*     push = +refs/changes/*:refs/changes/*     threads = 3     project = test_project 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.