Replication to another Gerrit server

90 views
Skip to first unread message

Luciano Carvalho

unread,
Aug 2, 2010, 8:29:46 PM8/2/10
to Repo and Gerrit Discussion
I'm trying to setup a replication to a server we have to share code with partners and I'm having a hard time getting it to work.
I couldn't figure out what the error message means so, need some enlightenment.

Here is my Gerrit's ~/.ssh/config:

Host partner abc.xyz.com
  Port 29418
  User replication-user
  PreferredAuthentications publickey
  StrictHostKeyChecking no


This is my $site_path/etc/replication.config:

[remote "partner"]
  url = abc.xyz.com:/project/${name}.git
  push = +refs/heads/partner-branch


This is the error I see:
 
[2010-08-02 17:06:44,326] ERROR com.google.gerrit.server.git.PushReplication : Unexpected error during replication to abc.xyz.com:/project/name/here.git
java.lang.IllegalArgumentException: Remote name can't be null.
        at org.eclipse.jgit.transport.RemoteRefUpdate.<init>(RemoteRefUpdate.java:189)
        at com.google.gerrit.server.git.PushOp.send(PushOp.java:278)
        at com.google.gerrit.server.git.PushOp.generateUpdates(PushOp.java:211)
        at com.google.gerrit.server.git.PushOp.pushVia(PushOp.java:183)
        at com.google.gerrit.server.git.PushOp.runImpl(PushOp.java:146)
        at com.google.gerrit.server.git.PushOp.run(PushOp.java:102)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
        at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:315)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)



Any clue with directions to where to start looking for errors would be awesome.

Thanks,

Luciano.


Shawn Pearce

unread,
Aug 2, 2010, 9:04:24 PM8/2/10
to Luciano Carvalho, Repo and Gerrit Discussion
On Mon, Aug 2, 2010 at 17:29, Luciano Carvalho <lsca...@gmail.com> wrote:
> I'm trying to setup a replication to a server we have to share code with
> partners and I'm having a hard time getting it to work.
> I couldn't figure out what the error message means so, need
> some enlightenment.
> Here is my Gerrit's ~/.ssh/config:
> Host partner abc.xyz.com
>   Port 29418
>   User replication-user
>   PreferredAuthentications publickey
>   StrictHostKeyChecking no
>
> This is my $site_path/etc/replication.config:
> [remote "partner"]
>   url = abc.xyz.com:/project/${name}.git
>   push = +refs/heads/partner-branch

Change the push line:

  push = +refs/heads/partner-branch:refs/heads/partner-branch

Sorry, yes, you have to stutter the value. Someone in the code
(Gerrit? JGit? not sure which) isn't stuttering it automatically
when the : is missing. :-(

Luciano Carvalho

unread,
Aug 2, 2010, 9:54:49 PM8/2/10
to Shawn Pearce, Repo and Gerrit Discussion
Thanks Shawn, it works now.

Shouldn't we mention this limitation in the documentation?


Luciano

Anatol Pomazau

unread,
Aug 2, 2010, 10:24:06 PM8/2/10
to Shawn Pearce, Luciano Carvalho, Repo and Gerrit Discussion
Should it be requested as a feature? http://code.google.com/p/gerrit/issues/list

Someone (maybe me) will look at it later.

Shawn Pearce

unread,
Aug 3, 2010, 10:39:27 AM8/3/10
to Anatol Pomazau, Luciano Carvalho, Repo and Gerrit Discussion

Eh, its more like a bug. Normal C Git understands "push = A" to mean
"push = A:A". We should be doing the same, whether its a JGit bug or
a Gerrit bug.

Reply all
Reply to author
Forward
0 new messages