Updating the runtime git4idea-rt classpath

I have a patch for svn4idea and git4idea plugins adding support for jsch-agentproxy (adding SSH agent support); this is available at https://github.com/charles-dyfis-net/intellij-community, and is currently functional and tested for svn4idea.

While this compiles correctly, git4idea-rt is unable to find classes from the new dependencies added at runtime.

I've tried moving these libraries out of the individual plugins into the core library section and adding it to lib/required_for_dist.txt (multiple copies of the same library in different core plugins seems silly -- and, in practice, led to bugs when the older, patched build of Trilead SSH2 bundled with the CVS plugin conflicted with the newer one used by the git and svn plugins).

What am I missing in terms of the runtime classpath for this plugin's execution?

1 comment

Hi Charles,

git4idea-rt is a module which contains classes which are executed not within the main instance of IntelliJ IDEA, but from the separate Java program, which is called by Git when the user performs a remote operation.
Here is how it works:

User calls "Push" from IDEA -> IDEA sets up a GIT_SSH environment variable pointing to a script (this is done in GitHandler#start()) -> Git begins performing push and understands that SSH is needed -> Git calls our script -> our script calls our Java program (it is called SSHMain) -> SSH Main performs SSH operations such as authentication, reading the private key, etc. ; if user input is required, SSHMain sends an XmlRpcRequest to the main IDEA instance, which shows a dialog to the user.

The classpath for the SSHMain java program is customized in org.jetbrains.git4idea.ssh.GitXmlRpcSshService#customizeScriptGenerator. Currently there is KnownHosts.class from trilead-ssh2 library. The library itself is located in plugins/git4idea/lib.

0

Please sign in to leave a comment.