Something like this:
Git.cloneRepository()
.setURI("ssh://username@localhost:8001/reponame")
.setDirectory(workingDirectory)
.setTransportConfigCallback(transport -> {
SshTransport sshTransport = (SshTransport) transport;
sshTransport.setSshSessionFactory(new JschConfigSessionFactory() {
@Override
protected void configure(Host host, Session session) {
session.setPassword("password");
java.util.Properties config = new java.util.Properties();
config.put("StrictHostKeyChecking", "no");
config.put("Host", "localhost");
config.put("VerifyHostKeyDNS", "no");
config.put("HostKeyAlgorithms", "+ssh-dss");
config.put("UserKnownHostsFile", "/dev/null");
session.setConfig(config);
}
});
})
.setCredentialsProvider(new
UsernamePasswordCredentialsProvider("username", "password"))
.call()
Regards,
___________________
Alexandre Porcelli
F:
+1 (978) 844-8695
http://porcelli.me
> --
> You received this message because you are subscribed to the Google Groups
> "Drools Usage" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
drools-usage...@googlegroups.com.
> To post to this group, send email to
drools...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/drools-usage/6b8017c3-f787-439d-a77b-8d70d686a4d6%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.