glassfish.common/src/org/netbeans/modules/glassfish/common/AdminAuthenticator.java permanently replaces org.netbeans.core.NbAuthenticator as a default java.net.Authenticator. I don't know if that's correct or not, but that's not the point.
Git support uses a 3rd-party library (JGit) for communication with remote repositories and that library handles authentication and authorization itself. But when any NB implementation of a java.net.Authenticator comes in the way, the connection (push command to be more precise) fails. For that reason we modified org.netbeans.core.NbAuthenticator in 7.1 to be capable of working with mechanisms that do not require (refuse actually) the dialog asking for username and password. Do you think you could rewrite AdminAuthenticator to work the same way?
1) Git runs a git command in:
> org.openide.util.suppressAuthenticationDialog(Callable<R> blockOfCode)
that sets a flag that tells the default NB authenticator to suppress the dialog and return null when getPasswordAuthentication is called
2) When getPasswordAuthentication is called, NbAuthenticator displays the dialog only when:
3) For a git command, the dialog is then never displayed and it successfully connects to a remote repository
Do you think you could display the dialog only when NetworkSettings.isAuthenticationDialogSuppressed() returns false also in:
j2ee.sun.appsrv/src/org/netbeans/modules/j2ee/sun/ide/editors/AdminAuthenticator.java - i don't know if you manage this class too. If so, please modify it, if not pass forward.
Created attachment 115371 [details]
thanks for taking care of this.
verified in trunk
(running GF from IDE doesn't interfere with Git authentication anymore after the patch)
7.1.1 ix: http://hg.netbeans.org/releases/rev/95f8c14eb2de
Integrated into 'releases', will be available in build *201202072200* or newer. Wait for official and publicly available build.
User: Ondrej Vrabec <firstname.lastname@example.org>
Log: #207897 - AdminAuthenticator prevents Git support from push
(transplanted from 602bbebb9c1e486a57237196ef8780b38a2336c9)
verified in 7.1.1