试图设置从gerrit复制到我的github回购。得到这个堆栈跟踪:gerrit github复制:jsch问题
[2011-09-20 00:11:58470]错误com.google.gerrit.server.git.PushReplication:无法复制到[email protected]:为myuser/myrepo.git
org.eclipse.jgit.errors.TransportException:[email protected]:myuser/myrepo.git:Session.connect:java.net.SocketTimeoutException:读取超时
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession (JschConfigSessionFactory.java:138)
在org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121)
在org.eclipse.jgit.transport.TransportGitSsh $ SshFetchConnection。(TransportGitSsh.java:248)
在org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
在com.google.gerrit.server.git.PushOp.listRemote(PushOp.java:358)
在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)
在java.util.concurrent.FutureTask.run(FutureTask.java:138)
在java.util.concurrent.ScheduledThreadPoolExecutor中的$ ScheduledFutureTask.access $ 301(的ScheduledThreadPoolExecutor的.java:98)
在java.util.concurrent.ScheduledThreadPoolExecutor中$ ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
在com.google.gerrit.server.git.WorkQueue $ Task.run(WorkQueue.java:324 )
在java.util.concurrent.ThreadPoolExecutor中$ Worker.runTask(ThreadPoolExecutor.java:886)
在java.util.concurrent.ThreadPoolExecutor中$ Worker.run(ThreadPoolExecutor.java:908)
0 com.jcraft.jsch.JSchException:在java.lang.Thread.run(Thread.java:662)所致Session.connect:java.net.SocketTimeoutException:阅读com.jcraft超时
.jsch.Session.connect(Session.java:504)
在org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:128)
我的配置文件如下:
replication.config:
[remote "github"]
url = [email protected]: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 /配置:
Host github.com:
IdentityFile ~/.ssh/id_rsa
PreferredAuthentications publickey
我试图运行
ssh -i etc/ssh_host_dsa_key [email protected]
ssh -i etc/ssh_host_rsa_key [email protected]
ssh -i ~/.ssh/id_rsa [email protected]
ssh -i ~/.ssh/id_dsa [email protected]
,并能“打”的github所以按键都是进口的好,不知道是什么问题, 知道的任何建议。
SocketTimeoutException *表示套接字读或超时发生超时*。你是否尝试增加超时值? –
谢谢我以前应该尝试过!在replication.config中将超时设置为60(与5相反)后,可以使用魅力。 – Konstantin
我不认为解决方案会那么简单,我只想排除一个可能的原因。我做了这个评论(附加一些信息)成为答案。如果它解决了您的问题,请随时接受它(使用绿色复选标记按钮)。 –