omegat icon indicating copy to clipboard operation
omegat copied to clipboard

Team: Git: migrate to Apache MINA sshd (RFE#1598)

Open miurahr opened this issue 3 years ago • 12 comments

JSch has been unmaintained and JGit goes to Apache MINA sshd for its target. This PR migrate ssh transport to use Apache MINA sshd.

THIS IS A CHANGE for [email protected]

Future tasks

  • [x] Support ssh agent

ssh-agent support by JGit through apache MINA sshd is merged into JGit 6.0 (minimum Java 11) https://git.eclipse.org/c/jgit/jgit.git/commit/?id=634302d2da74226cff9f78e121ad5b8216c476e6

The PR is successor of PR #161 and #162.

miurahr avatar Dec 12 '21 23:12 miurahr

Now running 4hrs. integration test for the feature branch.... looks good for 20min at least... please wait a good news..

miurahr avatar Dec 13 '21 02:12 miurahr

A design of gui dialog to ask pass phrase is not nice and pretty. There is a space to improve UI.

miurahr avatar Dec 13 '21 02:12 miurahr

Now running 4hrs. integration test for the feature branch.... looks good for 20min at least... please wait a good news..

It works well in 4 hours.

miurahr avatar Dec 13 '21 06:12 miurahr

A design of gui dialog to ask pass phrase is not nice and pretty. There is a space to improve UI.

A host fingerprint dialog is works now and resolved. You may see a user/password dialog for asking SSH encrypted key passphrase, that should only ask passphrase.

miurahr avatar Dec 13 '21 06:12 miurahr

2 hours integration test is passed at 0aa8760

miurahr avatar Dec 13 '21 12:12 miurahr

JGit/MINA ssh agent can be supported when OmegaT moves to minimum requirements to Java 11, because JGit 6.0 and later support it.

ref:

JGit git log

issues

miurahr avatar Dec 17 '21 05:12 miurahr

JGit/MINA ssh agent can be supported when OmegaT moves to minimum requirements to Java 11, because JGit 6.0 and later support it.

You can try ssh agent support by JGit6.0 wtih a following small patch.

diff --git a/build.gradle b/build.gradle
index f2aef56b1..b65b076bc 100644
--- a/build.gradle
+++ b/build.gradle
@@ -160,8 +160,7 @@ dependencies {
         implementation "org.apache.lucene:lucene-analyzers-stempel:${luceneVersion}"
 
         // Team project server support
-        implementation 'org.eclipse.jgit:org.eclipse.jgit:5.13.0.202109080827-r'
-        implementation 'org.eclipse.jgit:org.eclipse.jgit.ssh.apache:5.13.0.202109080827-r'
+        implementation 'org.eclipse.jgit:org.eclipse.jgit.ssh.apache.agent:6.0.0.202111291000-r'
         implementation 'org.apache.sshd:sshd-git:2.7.0'
         implementation 'org.bouncycastle:bcprov-jdk15on:1.69'

miurahr avatar Dec 19 '21 02:12 miurahr

@amake Could I move to [email protected] and Java 11 for here?

miurahr avatar Feb 15 '22 05:02 miurahr

ref: ssh agent support description on jgit6.0 README https://git.eclipse.org/c/jgit/jgit.git/commit/?id=0fb5f47d2e8135721e1b5be9ee9e956af5330fc9

miurahr avatar Feb 15 '22 05:02 miurahr

Re-base to master and squashed.

miurahr avatar Mar 31 '22 23:03 miurahr

@amake you can merge it when you move to Java 11.

miurahr avatar Apr 09 '22 16:04 miurahr

Now rebase to current master

miurahr avatar Aug 26 '22 03:08 miurahr

Rebased and squashed on current master. Several fixes on comments typos.

miurahr avatar Apr 15 '23 00:04 miurahr

The change pass the integration test in default setting.

miurahr avatar Apr 15 '23 00:04 miurahr