Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » KeyExchangeFactories not set(KeyExchangeFactories not set error when trying to clone a repo on Android)
KeyExchangeFactories not set [message #1860762] Fri, 01 September 2023 14:40 Go to next message
wiiz nokes2 is currently offline wiiz nokes2Friend
Messages: 1
Registered: September 2023
Junior Member
Hi, i'm very new to jgit. I'm trying to setup an
SshdSessionFactory
.
The fun part is that i am on Android.

Here is how I build my
SshdSessionFactory
:

fun build(): SshdSessionFactory {

        val sshdSessionFactory = SshdSessionFactoryBuilder()
            .setPreferredAuthentications("publickey")
            .setHomeDirectory(homeDir)
            .setSshDirectory(sshDir)
            //.setDefaultIdentities { listOf(Paths.get(privateKey.path)) }
            .build(null)


        SshSessionFactory.setInstance(sshdSessionFactory);
        return sshdSessionFactory
    }


And here is the message error i get when i trying to clone a repo:

Caused by: java.lang.IllegalArgumentException: KeyExchangeFactories not set
2023-09-01 15:57:21.596  5105-5105  System.err              com.example.gitnote                  W  	at org.apache.sshd.common.util.ValidateUtils.$r8$lambda$1D3Pm1dHguhozQI_dpJQD8NBElg(Unknown Source:2)
2023-09-01 15:57:21.596  5105-5105  System.err              com.example.gitnote                  W  	at org.apache.sshd.common.util.ValidateUtils$$ExternalSyntheticLambda1.apply(Unknown Source:2)
2023-09-01 15:57:21.596  5105-5105  System.err              com.example.gitnote                  W  	at org.apache.sshd.common.util.ValidateUtils.createFormattedException(ValidateUtils.java:213)
2023-09-01 15:57:21.596  5105-5105  System.err              com.example.gitnote                  W  	at org.apache.sshd.common.util.ValidateUtils.throwIllegalArgumentException(ValidateUtils.java:179)
2023-09-01 15:57:21.596  5105-5105  System.err              com.example.gitnote                  W  	at org.apache.sshd.common.util.ValidateUtils.checkTrue(ValidateUtils.java:174)
2023-09-01 15:57:21.596  5105-5105  System.err              com.example.gitnote                  W  	at org.apache.sshd.common.util.ValidateUtils.checkNotNullAndNotEmpty(ValidateUtils.java:80)
2023-09-01 15:57:21.596  5105-5105  System.err              com.example.gitnote                  W  	at org.apache.sshd.common.helpers.AbstractFactoryManager.checkConfig(AbstractFactoryManager.java:513)
2023-09-01 15:57:21.596  5105-5105  System.err              com.example.gitnote                  W  	at org.apache.sshd.client.SshClient.checkConfig(SshClient.java:396)
2023-09-01 15:57:21.596  5105-5105  System.err              com.example.gitnote                  W  	at org.apache.sshd.client.SshClient.start(SshClient.java:455)
2023-09-01 15:57:21.596  5105-5105  System.err              com.example.gitnote                  W  	at org.eclipse.jgit.transport.sshd.SshdSession.connect(SshdSession.java:98)
2023-09-01 15:57:21.596  5105-5105  System.err              com.example.gitnote                  W  	at org.eclipse.jgit.transport.sshd.SshdSessionFactory.getSession(SshdSessionFactory.java:256)
2023-09-01 15:57:21.596  5105-5105  System.err              com.example.gitnote                  W  	... 80 more


I guess this is because i don't have an agent/client setup since i'm on Android. So how can i get rid on this error ?
Re: KeyExchangeFactories not set [message #1860790 is a reply to message #1860762] Sun, 03 September 2023 17:09 Go to previous message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
Unclear. I do not have Android available to test, so I cannot really help. Possible causes:

  • No SecurityProvider is installed.
  • No SecurityProvider supporting generating keypairs for the DH algorithm is installed.
  • Something goes wrong in Apache MINA sshd on Android with figuring out the maximum and minimum key sizes supported for the DH algorithm. (Apache MINA sshd by default checks for a key size of 8192 bits initially -- I've seen mentions that Android had a maximum of only 4096.)

Previous Topic:Using UltraCompare as external compare tool
Next Topic:Doesn't refresh history after deleting local branch
Goto Forum:
  


Current Time: Wed May 08 05:30:05 GMT 2024

Powered by FUDForum. Page generated in 0.03322 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top