This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 207789 - Git push authentication fails on JavaForge
Summary: Git push authentication fails on JavaForge
Status: VERIFIED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Git (show other bugs)
Version: 7.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on: 207897
Blocks:
  Show dependency tree
 
Reported: 2012-01-26 19:54 UTC by artisan
Modified: 2012-02-14 16:49 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
error log (66.28 KB, text/x-log)
2012-01-26 19:54 UTC, artisan
Details
The log after removing the user directory. (57.69 KB, text/plain)
2012-01-27 17:06 UTC, artisan
Details
Popup to endlessly trying to authenticate. (15.63 KB, image/png)
2012-01-27 17:07 UTC, artisan
Details
screenshot of the small authentication popup window (157.47 KB, image/png)
2012-01-27 17:35 UTC, artisan
Details
thread dump of NB while the small authentication popup is on the screen. (29.53 KB, text/plain)
2012-01-27 18:06 UTC, artisan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description artisan 2012-01-26 19:54:08 UTC
Created attachment 115283 [details]
error log

I'm getting a 401 error when pushing to a remote Git repository. The authentication dialog keeps asking me for credentials. When canceling it gives the error message: 

http://java_artisan@javaforge.com/git/JvmAudit: 401 Authorization Required

=================================================================================

However, it works when running the very same git command from the command line:

git push http://javaforge.com/git/JvmAudit +refs/heads/master:refs/heads/master

=================================================================================
Product Version: NetBeans IDE 7.1 (Build 201112071828)
Java: 1.7.0_02; Java HotSpot(TM) 64-Bit Server VM 22.0-b10
System: Linux version 3.0.0-15-generic running on amd64; UTF-8; en_US (nb)
User directory: /home/jan/.netbeans/7.1
Cache directory: /home/jan/.netbeans/7.1/var/cache
Comment 1 Ondrej Vrabec 2012-01-27 08:46:28 UTC
I have problems authenticate when the checkbox "Save Password" is not selected. However when i enter username and password correctly in the dialog and select the checkbox, i get successfully to the next panel.
Comment 2 artisan 2012-01-27 08:50:04 UTC
I'll try that today.

What's weird is that I get a second popup dialog asking me for credentials again. Probably when the authentication fails ?
Comment 3 Ondrej Vrabec 2012-01-27 09:24:12 UTC
fixed: core-main #3baaa3eb3345
IMO, would be a nice 71patch-candidate. stepan? marian?
Comment 4 artisan 2012-01-27 09:28:48 UTC
Is this by any chance OS-dependent ?

The push works on my Mint Debian laptop. But doesn't on my Ubuntu 11.10 desktop. Both use the same version of Netbeans and JDK.
Comment 5 Stepan Zebra 2012-01-27 09:38:20 UTC
checking...
Comment 6 Ondrej Vrabec 2012-01-27 09:44:52 UTC
> Is this by any chance OS-dependent ?
The problem i found (with the checkbox selected/unselected) is not OS dependent. However your issue may be caused by something else. I would like you to check once more when you have the chance.
Comment 7 artisan 2012-01-27 10:22:27 UTC
It appears this is a different bug. Just like said, when the checkbox is not checked you can't proceed further.

The problem I have comes later (I've always set the checkbox). I can select the master branch and click Finish. But after that I get a popup dialog to enter the credentials again. And whatever I type there, it doesn't work. When finally click on "Cancel" it says there was a 401 error.

But that's only on my desktop. On my laptop it works.
Comment 8 artisan 2012-01-27 10:25:46 UTC
I'll check the network traffic of my desktop tonight to see what's being sent to the server.

Unfortunately my desktop is at home so I can't check this right now. Anything else I might look for ?
Comment 9 Ondrej Vrabec 2012-01-27 10:33:40 UTC
> Anything else I might look for ?
I have no idea what might be wrong. I have no problem pushing to my repository on JavaForge. The only thing i can imagine is you're pushing with an account that has no write-access rights on the repository (that would explain the error message). However that's hardly your case since you can push with the same account on a different machine.
Comment 10 artisan 2012-01-27 10:37:49 UTC
It's even stranger than that: Using the same git command works when doing it from the command line. On the desktop computer where Netbeans doesn't want to authenticate. :-)

So the difference *has* to be the authentication data. I'll check the traffic tonight and update this ticket.
Comment 11 artisan 2012-01-27 17:06:06 UTC
Now, this is interesting: The checkbox bug does not happen on my desktop. I can proceed to the next screen to select the branch to push. Even when the checkbox is unchecked. :-)

Double checked the Netbeans and JDK releases: They're they very same.

Erased my user directory and restarted Netbeans. And now I've got both the bugs. The checkbox must be checked. Then I'm getting a small, two field, popup titled "Git Access". And after that I'm getting a bigger popup (see screenshot) to authenticate some more. Which I can't get rid of. The small popup does not appear when I'm trying the whole thing again. :-)
Comment 12 artisan 2012-01-27 17:06:59 UTC
Created attachment 115327 [details]
The log after removing the user directory.
Comment 13 artisan 2012-01-27 17:07:50 UTC
Created attachment 115328 [details]
Popup to endlessly trying to authenticate.
Comment 14 Ondrej Vrabec 2012-01-27 17:14:07 UTC
Hmm, the reason is the small dialog "Git Access". Do not enter anything into the dialog and instead cancel that one. This small dialog is an irritating initiative of NetBeans platform trying to be too clever. Instead of helping it interrupts git authorization.
So when the small dialog displays, cancel it. You should then be able to push.
Also please make a screenshot and a thread dump (http://wiki.netbeans.org/GenerateThreadDump) when the small dialog is displayed and attach them. That should help me understand why it is displayed at all.
Comment 15 artisan 2012-01-27 17:20:42 UTC
I'll do that. But ... the plot thickens. :-)

I've removed the user dir of the non-working netbeans and restart it it. And then imported the settings of the working Netbeans into the non-working Netbeans. Guess what: It works. :-)
Comment 16 artisan 2012-01-27 17:35:48 UTC
Created attachment 115330 [details]
screenshot of the small authentication popup window
Comment 17 artisan 2012-01-27 17:36:59 UTC
Canceling the small authentication window does not help. After it I can select the branch but then the small window appears again.

I'll upload the heap dump right now.
Comment 18 artisan 2012-01-27 17:44:00 UTC
The heap dump is too big to upload apparently. It's 27mb compressed.

Anyway, for me it's simple to reproduce:

* Stop NB.
* Remove the user dir.
* Start NB.
* Open the project.
* Push the changes => popup appears.

Importing settings from a working NB seems to solve the problem. So the default settings of NB are probably the cause. But as to why it works on that particular machine ... ?
Comment 19 Ondrej Vrabec 2012-01-27 17:51:01 UTC
(In reply to comment #18)
Attach a thread dump, not a heap dump. Ctrl+/ on linux, see the instructions in http://wiki.netbeans.org/GenerateThreadDump
Comment 20 artisan 2012-01-27 18:06:05 UTC
Created attachment 115331 [details]
thread dump of NB while the small authentication popup is on the screen.
Comment 21 Ondrej Vrabec 2012-01-30 10:10:12 UTC
the improper auth dialog issue: fixed in bug ##207897
Comment 22 artisan 2012-01-30 11:35:47 UTC
For my particular case there's the workaround of importing the working settings. So I guess there's a workaround by editing the settings. Correct ?

Or is that useless because 7.2 is imminent ?
Comment 23 Stepan Zebra 2012-02-03 14:47:00 UTC
verified in trunk
(checkbox problem solved after the patch)
Comment 24 Ondrej Vrabec 2012-02-07 14:37:07 UTC
7.1.1 fix: http://hg.netbeans.org/releases/rev/63e38364b682
Comment 25 artisan 2012-02-07 14:43:27 UTC
Many thanks indeed from a happy user ! :-)
Comment 26 Quality Engineering 2012-02-08 02:33:50 UTC
Integrated into 'releases', will be available in build *201202072200* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/63e38364b682
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #207789 - Git push authentication fails on JavaForge
cached repository connection settings should be cloned otherwise cached password and passphrased will be nulled after a connection attempt
(transplanted from 3baaa3eb3345110845c9fe92c3308052c01bcbf2)
Comment 27 Stepan Zebra 2012-02-14 16:49:55 UTC
verified in 7.1.1