My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 896: Replication URL requires ${name}
2 people starred this issue and may be notified of changes. Back to list
Status:  Released
Owner:  ----
Closed:  Apr 2011


Sign in to add a comment
 
Reported by francoisatwork@gmail.com, Apr 3, 2011
Affected Version: 2.1.6.1

What steps will reproduce the problem?
1. Add the following to project/etc/replication.config:

[remote "gitorious"]
  url = ssh://git@gitorious.org/~maharabot/mahara/gerrit-testing.git
  push = +refs/heads/*:refs/heads/*
  push = +refs/tags/*:refs/tags/*

2. Start gerrit: "project/bin/gerrit.sh start"
3. Tail the log: "tail -f project/logs/error_log 

This is the error that's returned:

2) Error injecting constructor, org.eclipse.jgit.errors.ConfigInvalidException: remote.gitorious.url "ssh://git@gitorious.org/~maharabot/mahara/gerrit-testing.git" lacks ${name} placeholder in /home/gerrit/mahara_reviews/etc/replication.config
  at com.google.gerrit.server.git.PushReplication.<init>(PushReplication.java:89)
  while locating com.google.gerrit.server.git.PushReplication
Caused by: org.eclipse.jgit.errors.ConfigInvalidException: remote.gitorious.url "ssh://git@gitorious.org/~maharabot/mahara/gerrit-testing.git" lacks ${name} placeholder in /home/gerrit/mahara_reviews/etc/replication.config
	at com.google.gerrit.server.git.PushReplication.allConfigs(PushReplication.java:161)
	at com.google.gerrit.server.git.PushReplication.<init>(PushReplication.java:94)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
	at com.google.inject.DefaultConstructionProxyFactory$2.newInstance(DefaultConstructionProxyFactory.java:81)
	at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
	at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111)
	at com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
	at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811)
	at com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
	at com.google.inject.Scopes$1$1.get(Scopes.java:54)
	at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
	at com.google.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)
	at com.google.inject.InjectorBuilder$1.call(InjectorBuilder.java:194)
	at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:804)
	at com.google.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:194)
	at com.google.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:176)
	at com.google.inject.InjectorBuilder.build(InjectorBuilder.java:113)
	at com.google.inject.InjectorImpl.createChildInjector(InjectorImpl.java:144)
	at com.google.gerrit.pgm.Daemon.createSysInjector(Daemon.java:208)
	at com.google.gerrit.pgm.Daemon.run(Daemon.java:129)
	at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:76)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:155)
	at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:89)
	at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:47)
	at Main.main(Main.java:25)

2 errors
	at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:354)
	at com.google.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:179)
	at com.google.inject.InjectorBuilder.build(InjectorBuilder.java:113)
	at com.google.inject.InjectorImpl.createChildInjector(InjectorImpl.java:144)
	at com.google.gerrit.pgm.Daemon.createSysInjector(Daemon.java:208)
	at com.google.gerrit.pgm.Daemon.run(Daemon.java:129)
	at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:76)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:155)
	at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:89)
	at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:47)
	at Main.main(Main.java:25)



Please provide any additional information below.

Apr 4, 2011
#1 sop@google.com
This works as designed. You need to include the wildcard ${name} so that Gerrit can setup which project it is replicating from the source server to the destination server.
Status: WontFix
Apr 4, 2011
#2 francoisatwork@gmail.com
Fair enough.

I am currently working with only one repo so I couldn't see the need for this, but it makes sense.

I have submitted a merge request to clarify this point in the documentation:

  https://review.source.android.com/#change,22116
Apr 4, 2011
#3 sop@google.com
Documentation change included in 2.1.7.
Status: Submitted
Labels: FixedIn-2.1.7
May 31, 2011
#4 sop@google.com
(No comment was entered for this change.)
Status: Released
Sign in to add a comment

Powered by Google Project Hosting