I’m now using SVNKit 1.10.11.
SVNKit now use Apache MINA SSHD that supports parsing .ssh/config file and identify key file configured and asking users for file password/passphrase.
Unfortunately, when SVNKit creates SshClient object in org.tmatesoft.svn.core.internal.io.svn.ssh.apache.SshConnection class
it is just a default client of SshClient interface and SVNKit does not set any file password provider using setFilePasswordProvider method of SshClient.
When I provide passphrase to SVNSSHAuthenticate object without keyfile, and give svn+ssh protocol SVNURL, apache mina sshd warns “loadKeys(/home/miurahr/.ssh/id_rsa) failed (FailedLoginException) to load key: No password data for encrypted resourc= ~/.ssh/id_rsa” warning and failed to connect.
When you don’t provide a FilePasswordProvider object to SshClient, the client use EMPTY provider, so there is no passphrase passed.
It is great if you add an interface to provide FilePasswordProvider object from SVNAuthenticationManager interface.
FYI here is log messages when connection failed in application that use SVNKit with apache-mina-sshd. (sorry for localised log, 情報 is info level 注意 is warn, エラー is error)
50308: 情報: getOrCreateProvider(BC) created instance of org.bouncycastle.jce.provider.BouncyCastleProvider
50308: 情報: getOrCreateProvider(EdDSA) created instance of net.i2p.crypto.eddsa.EdDSASecurityProvider
50308: 情報: resolveEffectiveResolver(miurahr@svn.pf.osdn.net:22) loaded 21 entries from /home/miurahr/.ssh/config
50308: 注意: loadKeys(/home/miurahr/.ssh/id_rsa) failed (FailedLoginException) to load key: No password data for encrypted resource=/home/miurahr/.ssh/id_rsa
50308: 情報: Disconnecting(ClientSessionImpl[miurahr@svn.pf.osdn.net/44.236.58.94:22]): SSH2_DISCONNECT_PROTOCOL_ERROR - Detected AuthTimeout after 1058598/120000 ms.
50308: エラー: SVN ‘checkout’ エラー:svn: E210002: Failed to connect to svn.pf.osdn.net:22 (SVN_ERROR)
50308: エラー: チームプロジェクトをダウンロードできません。 (PP_ERROR_UNABLE_TO_DOWNLOAD_TEAM_PROJECT)
50308: エラー: java.util.concurrent.ExecutionException: org.omegat.core.team2.IRemoteRepository2$NetworkException: org.tmatesoft.svn.core.SVNException: svn: E210002: Failed to connect to svn.pf.osdn.net:22
50308: エラー: at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
50308: エラー: at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
50308: エラー: at java.desktop/javax.swing.SwingWorker.get(SwingWorker.java:613)
50308: エラー: at org.omegat.gui.main.ProjectUICommands$4.done(ProjectUICommands.java:372)
50308: エラー: at java.desktop/javax.swing.SwingWorker$5.run(SwingWorker.java:750)
50308: エラー: at java.desktop/javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:847)
50308: エラー: at java.desktop/sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
50308: エラー: at java.desktop/javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:857)
50308: エラー: at java.desktop/javax.swing.Timer.fireActionPerformed(Timer.java:317)
50308: エラー: at java.desktop/javax.swing.Timer$DoPostEvent.run(Timer.java:249)
50308: エラー: at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
50308: エラー: at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
50308: エラー: at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
50308: エラー: at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
50308: エラー: at java.base/java.security.AccessController.doPrivileged(Native Method)
50308: エラー: at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
50308: エラー: at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
50308: エラー: at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
50308: エラー: at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
50308: エラー: at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
50308: エラー: at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
50308: エラー: at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
50308: エラー: at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
50308: エラー: Caused by: org.omegat.core.team2.IRemoteRepository2$NetworkException: org.tmatesoft.svn.core.SVNException: svn: E210002: Failed to connect to svn.pf.osdn.net:22
50308: エラー: at org.omegat.core.team2.impl.SVNRemoteRepository2.checkNetworkException(SVNRemoteRepository2.java:280)
50308: エラー: at org.omegat.core.team2.impl.SVNRemoteRepository2.switchToVersion(SVNRemoteRepository2.java:146)
50308: エラー: at org.omegat.core.team2.RemoteRepositoryProvider.switchAllToLatest(RemoteRepositoryProvider.java:200)
50308: エラー: at org.omegat.gui.main.ProjectUICommands$4.doInBackground(ProjectUICommands.java:340)
50308: エラー: at org.omegat.gui.main.ProjectUICommands$4.doInBackground(ProjectUICommands.java:309)
50308: エラー: at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304)
50308: エラー: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
50308: エラー: at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343)
50308: エラー: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
50308: エラー: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
50308: エラー: at java.base/java.lang.Thread.run(Thread.java:829)
50308: エラー: Caused by: org.tmatesoft.svn.core.SVNException: svn: E210002: Failed to connect to svn.pf.osdn.net:22
50308: エラー: at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:70)
50308: エラー: at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57)
50308: エラー: at org.tmatesoft.svn.core.internal.io.svn.SVNSSHConnector.open(SVNSSHConnector.java:135)
50308: エラー: at org.tmatesoft.svn.core.internal.io.svn.SVNConnection.open(SVNConnection.java:80)
50308: エラー: at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.openConnection(SVNRepositoryImpl.java:1282)
50308: エラー: at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.getLatestRevision(SVNRepositoryImpl.java:173)
50308: エラー: at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.getRevisionNumber(SvnNgRepositoryAccess.java:119)
50308: エラー: at org.tmatesoft.svn.core.internal.wc2.SvnRepositoryAccess.getLocations(SvnRepositoryAccess.java:180)
50308: エラー: at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.createRepositoryFor(SvnNgRepositoryAccess.java:43)
50308: エラー: at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.checkout(SvnNgAbstractUpdate.java:831)
50308: エラー: at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCheckout.run(SvnNgCheckout.java:26)
50308: エラー: at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCheckout.run(SvnNgCheckout.java:11)
50308: エラー: at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20)
50308: エラー: at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
50308: エラー: at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1239)
50308: エラー: at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
50308: エラー: at org.tmatesoft.svn.core.wc.SVNUpdateClient.doCheckout(SVNUpdateClient.java:777)
50308: エラー: at org.omegat.core.team2.impl.SVNRemoteRepository2.switchToVersion(SVNRemoteRepository2.java:141)
50308: エラー: … 9 more
50308: エラー: Caused by: java.io.IOException: Failed to connect to svn.pf.osdn.net:22
50308: エラー: at org.tmatesoft.svn.core.internal.io.svn.ssh.apache.SshHost.openConnection(SshHost.java:229)
50308: エラー: at org.tmatesoft.svn.core.internal.io.svn.ssh.apache.SshHost.openSession(SshHost.java:155)
50308: エラー: at org.tmatesoft.svn.core.internal.io.svn.ssh.apache.ApacheSshSessionPool.openSession(ApacheSshSessionPool.java:100)
50308: エラー: at org.tmatesoft.svn.core.internal.io.svn.ssh.apache.ApacheSshSessionPool.openSession(ApacheSshSessionPool.java:59)
50308: エラー: at org.tmatesoft.svn.core.internal.io.svn.SVNSSHConnector.open(SVNSSHConnector.java:112)
50308: エラー: … 24 more
50308: エラー: Caused by: org.apache.sshd.common.SshException: DefaultAuthFuture[ssh-connection]: Failed to get operation result within specified timeout: 10000
50308: エラー: at org.apache.sshd.common.future.AbstractSshFuture.formatExceptionMessage(AbstractSshFuture.java:190)
50308: エラー: at org.apache.sshd.common.future.AbstractSshFuture.verifyResult(AbstractSshFuture.java:112)
50308: エラー: at org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:39)
50308: エラー: at org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:32)
50308: エラー: at org.tmatesoft.svn.core.internal.io.svn.ssh.apache.SshConnection.(SshConnection.java:92)
50308: エラー: at org.tmatesoft.svn.core.internal.io.svn.ssh.apache.SshHost.openConnection(SshHost.java:227)
50308: エラー: … 28 more
50308: 情報: イベント:プログラムの終了 (LOG_INFO_EVENT_APPLICATION_SHUTDOWN)