This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/main by this push:
new 436a0e23b3 avoid ssh issue in git, fixes #7150 (#7152)
436a0e23b3 is described below
commit 436a0e23b3c7286ee764af2ea162c1dfaed74ccf
Author: Hans Van Akelyen <[email protected]>
AuthorDate: Thu May 21 11:15:30 2026 +0200
avoid ssh issue in git, fixes #7150 (#7152)
---
.../src/main/java/org/apache/hop/git/model/UIGit.java | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/plugins/misc/git/src/main/java/org/apache/hop/git/model/UIGit.java
b/plugins/misc/git/src/main/java/org/apache/hop/git/model/UIGit.java
index 82223b7bec..cc22981b42 100644
--- a/plugins/misc/git/src/main/java/org/apache/hop/git/model/UIGit.java
+++ b/plugins/misc/git/src/main/java/org/apache/hop/git/model/UIGit.java
@@ -102,7 +102,6 @@ import org.eclipse.jgit.transport.SshSessionFactory;
import org.eclipse.jgit.transport.URIish;
import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider;
import org.eclipse.jgit.transport.http.apache.HttpClientConnectionFactory;
-import org.eclipse.jgit.transport.sshd.SshdSessionFactory;
import org.eclipse.jgit.transport.sshd.SshdSessionFactoryBuilder;
import org.eclipse.jgit.treewalk.AbstractTreeIterator;
import org.eclipse.jgit.treewalk.CanonicalTreeParser;
@@ -134,6 +133,11 @@ public class UIGit extends VCS {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=296201 for more details.
*/
HttpTransport.setConnectionFactory(new HttpClientConnectionFactory());
+ SshSessionFactory.setInstance(
+ new SshdSessionFactoryBuilder()
+ .setHomeDirectory(new File(System.getProperty("user.home")))
+ .setSshDirectory(new File(System.getProperty("user.home"), ".ssh"))
+ .build(null));
}
@Getter private Git git;
@@ -677,17 +681,9 @@ public class UIGit extends VCS {
PushCommand cmd;
String url = git.getRepository().getConfig().getString("remote",
"origin", "url");
+ cmd = git.push();
if (!StringUtils.isEmpty(url) && (url.startsWith("https://") ||
url.startsWith("http://"))) {
- cmd = git.push();
cmd.setCredentialsProvider(credentialsProvider);
- } else {
- SshdSessionFactory customFactory =
- new SshdSessionFactoryBuilder()
- .setHomeDirectory(new File(System.getProperty("user.home")))
- .setSshDirectory(new File(System.getProperty("user.home"),
".ssh"))
- .build(null);
- SshSessionFactory.setInstance(customFactory);
- cmd = git.push();
}
if (name != null) {