Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Connect to repo using SSH

The JSSH library used by JGit picks up SSH keys from ~/.ssh/ by default, IIRC. If you need more control you can fully configure this process with a TransportConfigCallback:

For instance, if a client needs to replace the SshSessionFactorys on any SSHTransport used, they can set the TransportConfigCallback on the JGit API command - once the transport has been created by the command, the callback will be invoked and passed the transport instance, which the client can then inspect and configure as necessary.

Here's an example in Agit of using the callback to do custom SSH challenge generation - this may be slightly more involved than what you need, you can probably get away with one of the default JSSH Identity implementations:

On 3 June 2014 07:21, Bhushan Nagaraj <bhushan154@xxxxxxxxx> wrote:
Hi all,

Using jgit API, how do I connect to a repository using a SSH key and passphrase?


jgit-dev mailing list

Back to the top