我正在尝试设置Gerrit复制插件,如下所示:
[remote "github"]
url = [email protected]:ORGNAME/${name}.git
push = +refs/heads/*:refs/heads/*
push = +refs/heads/*:refs/tags/*
threads = 3
timeout = 30
remoteNameStyle = dash
rescheduleDelay = 15
但我收到身份验证错误,这看起来很奇怪,因为如果我输入
ssh -t [email protected],
我明白了
Hi USERNAME! You've successfully authenticated, but GitHub does not provide shell access.
无论如何,这是我运行gerrit.sh replication start --wait --all时遇到的主要错误
[2019-02-18 12:37:51,084] [05b16c69] Replication to [email protected]:ORGNAME/REPONAME.git started...
[2019-02-18 12:37:51,089] [05b16c69] Push to [email protected]:ORGNAME/REPONAME.git references: [RemoteRefUpdate[remoteName=refs/heads/master, NOT_ATTEMPTED, (null)...5f80155dc87f4aca9e0f7ce8cbccbab3ff466c4a, srcRef=refs/heads/master, forceUpdate, message=null]]
[2019-02-18 12:37:51,697] [05b16c69] Cannot replicate to [email protected]:ORGNAME/REPONAME.git
org.eclipse.jgit.errors.TransportException: [email protected]:ORGNAME/REPONAME.git: Auth fail
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:192)
at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:140)
at org.eclipse.jgit.transport.TransportGitSsh$SshPushConnection.<init>(TransportGitSsh.java:339)
at org.eclipse.jgit.transport.TransportGitSsh.openPush(TransportGitSsh.java:176)
at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:160)
at org.eclipse.jgit.transport.Transport.push(Transport.java:1346)
at org.eclipse.jgit.transport.Transport.push(Transport.java:1392)
at com.googlesource.gerrit.plugins.replication.PushOne.pushVia(PushOne.java:452)
at com.googlesource.gerrit.plugins.replication.PushOne.runImpl(PushOne.java:431)
at com.googlesource.gerrit.plugins.replication.PushOne.runPushOperation(PushOne.java:316)
at com.googlesource.gerrit.plugins.replication.PushOne.access$000(PushOne.java:82)
at com.googlesource.gerrit.plugins.replication.PushOne$1.call(PushOne.java:281)
at com.googlesource.gerrit.plugins.replication.PushOne$1.call(PushOne.java:278)
at com.google.gerrit.server.util.RequestScopePropagator.lambda$cleanup$1(RequestScopePropagator.java:212)
at com.google.gerrit.server.util.RequestScopePropagator.lambda$context$0(RequestScopePropagator.java:191)
at com.google.gerrit.server.git.PerThreadRequestScope$Propagator.lambda$scope$0(PerThreadRequestScope.java:73)
at com.googlesource.gerrit.plugins.replication.PushOne.run(PushOne.java:285)
at com.google.gerrit.server.logging.LoggingContextAwareRunnable.run(LoggingContextAwareRunnable.java:83)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:646)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(Session.java:519)
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:146)
... 24 more
由于Github removing support for weak crypto standards,这可能与CVE-2015-4000有关。如果您的Gerrit版本比2.11.11旧,则需要升级它以使复制到Github再次工作。