diff --git a/lib/ant/lib/libraries.properties b/lib/ant/lib/libraries.properties
index 206f3ff969ee..27c150f92f42 100644
--- a/lib/ant/lib/libraries.properties
+++ b/lib/ant/lib/libraries.properties
@@ -75,7 +75,6 @@ junit-vintage-engine.version=5.10.0
junit-jupiter-engine.version=5.10.0
# Only used for internal tests in Ant project
junit-jupiter-params.version=${junit-jupiter-engine.version}
-jsch.version=0.1.55
jython.version=2.7.3
# log4j 1.2.15 requires JMS and a few other Sun jars that are not in the m2 repo
log4j.version=1.2.14
diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/CommunityLibraryLicenses.kt b/platform/build-scripts/src/org/jetbrains/intellij/build/CommunityLibraryLicenses.kt
index e63eceac8a15..c54ee6cdeb37 100644
--- a/platform/build-scripts/src/org/jetbrains/intellij/build/CommunityLibraryLicenses.kt
+++ b/platform/build-scripts/src/org/jetbrains/intellij/build/CommunityLibraryLicenses.kt
@@ -633,6 +633,14 @@ object CommunityLibraryLicenses {
.license("Eclipse Distribution License 1.0", "https://www.eclipse.org/org/documents/edl-v10.php")
.suppliedByOrganizations(Suppliers.ECLIPSE),
+ LibraryLicense("JGit SSH Apache", libraryName = "eclipse.jgit.ssh.apache", url = "https://www.eclipse.org/jgit/")
+ .license("Eclipse Distribution License 1.0", "https://www.eclipse.org/org/documents/edl-v10.php")
+ .suppliedByOrganizations(Suppliers.ECLIPSE),
+
+ LibraryLicense("JGit SSH Apache Agent", libraryName = "eclipse.jgit.ssh.apache.agent", url = "https://www.eclipse.org/jgit/")
+ .license("Eclipse Distribution License 1.0", "https://www.eclipse.org/org/documents/edl-v10.php")
+ .suppliedByOrganizations(Suppliers.ECLIPSE),
+
LibraryLicense("JGoodies Common", libraryName = "jgoodies-common", url = "https://www.jgoodies.com/freeware/libraries/looks/")
.newBsd("https://opensource.org/licenses/BSD-3-Clause"), // no longer OSS; historic versions are still available
@@ -665,10 +673,6 @@ object CommunityLibraryLicenses {
LibraryLicense("jps-javac-extension", libraryName = "jps-javac-extension", url = "https://github.com/JetBrains/jps-javac-extension/")
.apache("https://github.com/JetBrains/jps-javac-extension/blob/master/LICENSE.txt"),
- LibraryLicense("jsch", libraryName = "eclipse.jgit.ssh.jsch", url = "http://www.jcraft.com/jsch/")
- .newBsd("http://www.jcraft.com/jsch/LICENSE.txt")
- .suppliedByPersons("Atsuhiko Yamanaka"),
-
LibraryLicense(libraryName = "jsch-agent-proxy", url = "https://github.com/ymnk/jsch-agent-proxy")
.newBsd("https://github.com/ymnk/jsch-agent-proxy/blob/master/LICENSE.txt")
.suppliedByPersons("Atsuhiko Yamanaka"),
diff --git a/plugins/settings-repository/intellij.settingsRepository.iml b/plugins/settings-repository/intellij.settingsRepository.iml
index ac2bdfdd601d..50a7c7db000c 100644
--- a/plugins/settings-repository/intellij.settingsRepository.iml
+++ b/plugins/settings-repository/intellij.settingsRepository.iml
@@ -12,22 +12,60 @@
-
-
+
+
-
- 8ab7b5fefc2a42c5156c678148f415ce35ae8d93a8e3127b5426241e965606f6
+
+ 4ddd0cf1a7ece350b33f0a6b865e8fb777c30a2282a0fbd1754020a4e06af481
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+ cc379265edb2b74850156c16fefd7990281bf47e33fe7665e838f8b5fdb94755
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 65a0f1df8616ae371f19d000514afda9730089ddb7e6b7a03e96adfa17f6bccb
+
+
+
+
+
+
+
+
+
diff --git a/plugins/settings-repository/plugin-content.yaml b/plugins/settings-repository/plugin-content.yaml
index 3c16bde2c2ae..132bca1adcdc 100644
--- a/plugins/settings-repository/plugin-content.yaml
+++ b/plugins/settings-repository/plugin-content.yaml
@@ -8,5 +8,9 @@
modules:
- name: intellij.settingsRepository
libraries:
- eclipse.jgit.ssh.jsch:
- - name: $MAVEN_REPOSITORY$/org/eclipse/jgit/org.eclipse.jgit.ssh.jsch/6/org.eclipse.jgit.ssh.jsch-6.jar
\ No newline at end of file
+ eclipse.jgit.ssh.apache.agent:
+ - name: $MAVEN_REPOSITORY$/org/eclipse/jgit/org.eclipse.jgit.ssh.apache.agent/6/org.eclipse.jgit.ssh.apache.agent-6.jar
+ eclipse.jgit.ssh.apache:
+ - name: $MAVEN_REPOSITORY$/org/eclipse/jgit/org.eclipse.jgit.ssh.apache/6/org.eclipse.jgit.ssh.apache-6.jar
+ apache.sshd.osgi:
+ - name: $MAVEN_REPOSITORY$/org/apache/sshd/sshd-osgi/2/sshd-osgi-2.jar
\ No newline at end of file
diff --git a/plugins/settings-repository/src/git/GitEx.kt b/plugins/settings-repository/src/git/GitEx.kt
index a2d7be9a25d6..18ccee924bb8 100644
--- a/plugins/settings-repository/src/git/GitEx.kt
+++ b/plugins/settings-repository/src/git/GitEx.kt
@@ -13,6 +13,7 @@ import org.eclipse.jgit.api.ResetCommand
import org.eclipse.jgit.dircache.DirCacheCheckout
import org.eclipse.jgit.errors.TransportException
import org.eclipse.jgit.internal.JGitText
+import org.eclipse.jgit.internal.transport.sshd.agent.ConnectorFactoryProvider
import org.eclipse.jgit.lib.*
import org.eclipse.jgit.revwalk.RevCommit
import org.eclipse.jgit.revwalk.RevSort
@@ -24,7 +25,8 @@ import org.eclipse.jgit.transport.FetchResult
import org.eclipse.jgit.transport.RemoteConfig
import org.eclipse.jgit.transport.Transport
import org.eclipse.jgit.transport.SshSessionFactory
-import org.eclipse.jgit.transport.ssh.jsch.JschConfigSessionFactory
+import org.eclipse.jgit.transport.sshd.SshdSessionFactory
+import org.eclipse.jgit.transport.sshd.agent.ConnectorFactory
import org.eclipse.jgit.treewalk.FileTreeIterator
import org.eclipse.jgit.treewalk.TreeWalk
import org.jetbrains.annotations.NonNls
@@ -58,10 +60,15 @@ private fun isAuthFailedMessage(message: String): Boolean {
}
private fun ensureSshSessionFactory() {
- var instance = SshSessionFactory.getInstance()
- if (instance == null) {
- instance = JschConfigSessionFactory()
- SshSessionFactory.setInstance(instance)
+ var connectorFactoryInstance: ConnectorFactory? = ConnectorFactoryProvider.getDefaultFactory()
+ if (connectorFactoryInstance == null) {
+ connectorFactoryInstance = org.eclipse.jgit.internal.transport.sshd.agent.connector.Factory()
+ ConnectorFactoryProvider.setDefaultFactory(connectorFactoryInstance)
+ }
+ var sessionFactoryInstance = SshSessionFactory.getInstance()
+ if (sessionFactoryInstance == null) {
+ sessionFactoryInstance = SshdSessionFactory()
+ SshSessionFactory.setInstance(sessionFactoryInstance)
}
}