I have very annoying case. Took a time and collected some material.
I am running Eclipse IDE with Maven projects (m2e is working inside - integration of Maven to Eclipse), basically performing some build workflows over Maven projects by m2e (by Maven running in Eclipse process), at some point the following exception occurs later:
So, working with GIT plugin in Eclipse becomes impossible for any remote tasks (like PULLing or PUSHing).
Very strange issue, isn't it? So , I collected some screenshots while running Eclipse in debug mode and doing remote debugging in another Eclipse instance.
Look to an attached screenshot IvyAuthenticator_1: For some reason
is not working as you may expect!
IvyAuthenticator is set second time in Authenticator.setDefault(..) which creates strange chain, I suppose.
Making heapdump (screenshot IvyAuthenticator_2) you may see at least that there are 2 instances of IvyAuthenticator in JVM being created by different class loaders.
The workflow that causes IvyAuthenticator to be set to JVM's Authenticator is a Maven running in Eclipse process, executing ant-maven-plugin (acordingly pom.xml configuration) that runs Ant task (Ant's buil.xml) that uses Ivy to resolve some dependencies in order to build classpath for third-party Ant task to be executed later with that classpath...
So, having Maven that runs Ant that runs Ivy to resolve deps and using this chain in Eclipse with m2e leads to broken logic , probably related to multiple different classloaders created by m2e...
And then other parts of Eclipse like GIT are not working with strange exceptions about missing classes (which do exist).
Any thoughts on IvyAuthenticator? Is it really needed this way or way to disable it or.. ? Revise code that is not affected by described environment may be?..