Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 207897 - AdminAuthenticator prevents Git support from push
AdminAuthenticator prevents Git support from push
Product: serverplugins
Classification: Unclassified
Component: GlassFish
PC Linux
: P2 (vote)
: 7.1.1
Assigned To: Ondrej Vrabec
Depends on:
Blocks: 207789
  Show dependency treegraph
Reported: 2012-01-30 09:13 UTC by Ondrej Vrabec
Modified: 2012-02-14 16:49 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT

fix proposal (1.34 KB, patch)
2012-01-30 09:14 UTC, Ondrej Vrabec
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ondrej Vrabec 2012-01-30 09:13:24 UTC
glassfish.common/src/org/netbeans/modules/glassfish/common/ permanently replaces org.netbeans.core.NbAuthenticator as a default 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 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:
> NetworkSettings.isAuthenticationDialogSuppressed()
returns false
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/ - i don't know if you manage this class too. If so, please modify it, if not pass forward.
Comment 1 Ondrej Vrabec 2012-01-30 09:14:14 UTC
Created attachment 115371 [details]
fix proposal
Comment 2 Ondrej Vrabec 2012-01-30 10:09:20 UTC
Comment 3 Vince Kraemer 2012-01-31 04:12:23 UTC
thanks for taking care of this.
Comment 4 Stepan Zebra 2012-02-03 14:42:43 UTC
verified in trunk
(running GF from IDE doesn't interfere with Git authentication anymore after the patch)
Comment 5 Ondrej Vrabec 2012-02-07 14:36:38 UTC
7.1.1 ix:
Comment 6 Quality Engineering 2012-02-08 02:33:38 UTC
Integrated into 'releases', will be available in build *201202072200* or newer. Wait for official and publicly available build.
User: Ondrej Vrabec <>
Log: #207897 - AdminAuthenticator prevents Git support from push
honor NetworkSettings.isAuthenticationDialogSuppressed
(transplanted from 602bbebb9c1e486a57237196ef8780b38a2336c9)
Comment 7 Stepan Zebra 2012-02-14 16:49:31 UTC
verified in 7.1.1

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo