Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Neon eGit Integration gives Exception 401 Authorization Required

After upgrading to Neon my Egit integration has failed with the following Exception

enter image description here

UPDATE: See eclipse bug

i.errors.TransportException: https://github.com/[REPOSITORY]/SCA: 401 Authorization Required at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:169) at org.eclipse.egit.core.op.PushOperation.run(PushOperation.java:217) at org.eclipse.egit.ui.internal.push.PushOperationUI.execute(PushOperationUI.java:167) at org.eclipse.egit.ui.internal.push.PushOperationUI$1.run(PushOperationUI.java:229) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: org.eclipse.jgit.errors.TransportException: https://github.com/SCASoftware/SCA: 401 Authorization Required at org.eclipse.jgit.transport.TransportHttp$Service.openResponse(TransportHttp.java:855) at org.eclipse.jgit.transport.TransportHttp$MultiRequestService.execute(TransportHttp.java:956) at org.eclipse.jgit.transport.TransportHttp$Service$HttpExecuteStream.read(TransportHttp.java:882) at org.eclipse.jgit.util.io.UnionInputStream.read(UnionInputStream.java:145) at java.io.FilterInputStream.read(Unknown Source) at org.eclipse.jgit.util.io.TimeoutInputStream.read(TimeoutInputStream.java:112) at org.eclipse.jgit.util.IO.readFully(IO.java:247) at org.eclipse.jgit.transport.PacketLineIn.readLength(PacketLineIn.java:186) at org.eclipse.jgit.transport.SideBandInputStream.needDataPacket(SideBandInputStream.java:154) at org.eclipse.jgit.transport.SideBandInputStream.read(SideBandInputStream.java:136) at org.eclipse.jgit.util.IO.readFully(IO.java:247) at org.eclipse.jgit.transport.PacketLineIn.readLength(PacketLineIn.java:186) at org.eclipse.jgit.transport.PacketLineIn.readString(PacketLineIn.java:138) at org.eclipse.jgit.transport.BasePackPushConnection.readStringLongTimeout(BasePackPushConnection.java:395) at org.eclipse.jgit.transport.BasePackPushConnection.readStatusReport(BasePackPushConnection.java:328) at org.eclipse.jgit.transport.BasePackPushConnection.doPush(BasePackPushConnection.java:203) at org.eclipse.jgit.transport.TransportHttp$SmartHttpPushConnection.doPush(TransportHttp.java:786) at org.eclipse.jgit.transport.BasePackPushConnection.push(BasePackPushConnection.java:155) at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:167) at org.eclipse.jgit.transport.Transport.push(Transport.java:1250) at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:158) ... 4 more

I have chequed my credentials in gitHub web interface and keeps failing. More information:

eclipse.buildId=4.6.1.M20160907-1200 java.version=1.8.0_101 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=es_ES Framework arguments: -product org.eclipse.epp.package.jee.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

like image 296
borjab Avatar asked Oct 05 '16 17:10

borjab


1 Answers

Short version. It is a Eclipse bug. The new version that fixes the problem is available by doing:

  • Help -> Install New Software
  • Work with: http://download.eclipse.org/mpc/releases/1.5.1a
  • Select the "EPP Marketplace Client"
  • Proceed with defaults

Long version: 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.

There is a discussion in the Eclipse Forum: Eclipse Community Forum - Reply and a bug.

like image 117
Hemendra Sharma Avatar answered Sep 16 '22 14:09

Hemendra Sharma