Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6598987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:25:48+00:00 2026-05-25T18:25:48+00:00

Trying to setup replication from gerrit to my github repo. Getting this stacktrace: [2011-09-20

  • 0

Trying to setup replication from gerrit to my github repo. Getting this stacktrace:

[2011-09-20 00:11:58,470] ERROR com.google.gerrit.server.git.PushReplication : Cannot replicate to git@github.com:myuser/myrepo.git
org.eclipse.jgit.errors.TransportException: git@github.com:myuser/myrepo.git: Session.connect: java.net.SocketTimeoutException: Read timed out
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:138)
at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121)
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.(TransportGitSsh.java:248)
at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
at com.google.gerrit.server.git.PushOp.listRemote(PushOp.java:358)
at com.google.gerrit.server.git.PushOp.generateUpdates(PushOp.java:312)
at com.google.gerrit.server.git.PushOp.pushVia(PushOp.java:258)
at com.google.gerrit.server.git.PushOp.runImpl(PushOp.java:213)
at com.google.gerrit.server.git.PushOp.run(PushOp.java:166)
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:206)
at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:324)
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:662)

Caused by: com.jcraft.jsch.JSchException: Session.connect: java.net.SocketTimeoutException: Read timed out
at com.jcraft.jsch.Session.connect(Session.java:504)
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:128)

My config files are as follows:

replication.config:

[remote "github"]
url = git@github.com:myuser/${name}.git
push = +refs/heads/*:refs/heads/*
push = +refs/tags/*:refs/tags/*
timeout = 5
replicationDelay = 0
authGroup = Administrators

secure.config:

[database]
    password = secret
[ssh]
    file = /home/gerrit2/.ssh/config

.ssh/config:

Host github.com:
  IdentityFile ~/.ssh/id_rsa
  PreferredAuthentications publickey

I tried running

ssh -i etc/ssh_host_dsa_key git@github.com
ssh -i etc/ssh_host_rsa_key git@github.com
ssh -i ~/.ssh/id_rsa git@github.com
ssh -i ~/.ssh/id_dsa  git@github.com

and was able to “hit” github so the keys are imported OK, not sure what the problem is,
any suggestions appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:25:49+00:00Added an answer on May 25, 2026 at 6:25 pm

    As the name of the exception SocketTimeoutException says (and its documentation details):

    Signals that a timeout has occurred on a socket read or accept.

    Looking in the documentation of Gerrit’s replication.config:

    remote.<name>.timeout

    Number of seconds to wait for a network read or write to complete before giving up and declaring the remote side
    is not responding. If 0, there is no timeout, and the push client waits indefinitely.

    A timeout should be large enough to mostly transfer the objects to the other side. 1 second may be too small
    for larger projects, especially over a WAN link, while 10-30 seconds is a much more reasonable timeout value.

    Defaults to 0 seconds, wait indefinitely.

    Your value is 5 seconds, you could try it with a larger value instead.

    (The problem is only indirectly related to JSch – JSch’s Session.connect(int) will simply take the timeout parameter and pass it on to the Socket it creates. That reminds me that I should document which unit this timeout is for JSch – seconds or milliseconds.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.