|Re: Unauthorized 401 when trying to clone [message #1744755 is a reply to message #1744736]
||Fri, 30 September 2016 04:21
| Ed Merks
Registered: July 2009
Yes, I ran into the same problem this week. I spent a day debugging to figure out what was different in Neon.1 verses Neon.0. It turns out there was a change in Market Place Client such that it calls java.net.Authenticator.setDefault(Authenticator) with an Authenticator implementation that replaces the one registered by EGit, i.e., org.eclipse.egit.core.EclipseAuthenticator. I tracked down the change which does this and tracked that down to this Bugzilla:|
I haven't tried pushing yet, because it's a new project that I'm working on, so I was only trying to clone. But one subtle behavior I noticed, and that's perhaps a workaround for everyone, is that when you see a prompt for the password (the prompt without the check box to save it and without your user ID prefilled in the dialog), it's really MPC that's prompting for the password. If you enter a valid password, then EGit will not see a 401 response code, so EGit will not fill in your saved password when communicating with that server, hence the next EGit/JGit access will result in a 401 because the saved credentials are not being used. The tricky thing I noticed was that if I just hit escape or pressed cancel on the bogus password prompt, then EGit starts to work.
Note that if you use Oomph (the Eclipse Installer) to create your installation, there's a hack you can use to get it to install Neon.0 instead of Neon.1. In your IDE, use Navigate -> Open Setup -> User and then copy the following text for an Oomph redirection task from this post:
<?xml version="1.0" encoding="UTF-8"?>
<description>Neon.1 introduced bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=501000 so this task ensures that we install Neon.0 to avoid that problem.</description>
Right click on the root User object in the Setup editor, Paste this into your user.setup, and save. The installer will then redirect access to the Neon.1 repository to use the Neon.0 repository instead.
Hopefully there will be a build with the fix for this bug soon, and then we'll be able to use the same approach to replace the redirection task with a p2 task that points at the build with the fix so we can install Neon.1, but with the fixed version of MPC. (Or I'll be able to change the generated product catalog to add that update site so that you'll be able to delete the redirection task.)
You can follow the Bugzilla for developing details regarding the approach for addressing this problem.
Powered by FUDForum
. Page generated in 0.02372 seconds