Java git client using jgit

前端 未结 1 1493
青春惊慌失措
青春惊慌失措 2021-02-09 00:47

I am having some difficulties with a git client written in java. I am using the jGit library to connect through ssh on the git server. The problem is that i don\'t know how to s

相关标签:
1条回答
  • 2021-02-09 01:11

    I didn't ever use jGit, but from looking at the Javadocs (which are seemingly not online browsable, but can be downloaded) you need to configure a SshSessionFactory (i.e. create a subclass of JSchConfigSessionFactory, and override its configure method).

    The JSch object supports private keys with its addIdentity methods, and the passphrases can be given with UserInfo objects to each individual JSch Session.

    (Disclaimer: The JSch Javadoc was written by me.)

    0 讨论(0)
提交回复
热议问题