Skip to main content



      Home
Home » Eclipse Projects » EGit / JGit » jgit doesn't handle for http authentication (jgit http authenciation)
jgit doesn't handle for http authentication [message #1688164] Fri, 20 March 2015 04:55 Go to next message
Eclipse UserFriend
[my environment]
- Server (my private git server using smart http)
+ ubuntu / apache2
+ apache2 : keep-alive on, basic authentication for my git repo path

- Client (OSX)
+ shell (in terminal) : git version 1.9.5 (Apple Git-50.3)
+ eclipse (luna, 4.4.2) : egit/jgit version 4.0.0.201503xxxxxx

[problem]
when i pushed to git server via shell (terminal), it worked fine.
also i observed (with wireshark) git-client resent POST with authentication header after 401 from server
but eclipse jgit gave up after receiving 401 from server.
and eclipse always present "org.eclipse.jgit.errors.TransportException: http:// /git: 401 Authorization Required"
(although i entered username and password in dialog and check "store in secure...")

now...after debugging jgit source(4.0.0), i think current version has serious logical problem for http auth method (or jgit doesn't support http auth method officialy)

does anybody has idea?

---------

[401 from server (only header)]
HTTP/1.1 401 Authorization Required\r\n
Date: Mon, 16 Mar 2015 12:32:31 GMT\r\n
Server: Apache/2.2.22 (Ubuntu)\r\n
WWW-Authenticate: Basic realm="Public Git Repositories on xxxxxx"\r\n
Vary: Accept-Encoding\r\n
Content-Encoding: gzip\r\n
Content-Length: 340\r\n
Keep-Alive: timeout=5, max=99\r\n
Connection: Keep-Alive\r\n
Content-Type: text/html; charset=iso-8859-1\r\n

[eclipse jgit log]
org.eclipse.jgit.errors.TransportException: http:// someurltomygit /git: 401 Authorization Required
at org.eclipse.jgit.transport.TransportHttp$Service.openResponse(TransportHttp.java:879)
at org.eclipse.jgit.transport.TransportHttp$MultiRequestService.execute(TransportHttp.java:981)
at org.eclipse.jgit.transport.TransportHttp$Service$HttpExecuteStream.read(TransportHttp.java:907)
at org.eclipse.jgit.util.io.UnionInputStream.read(UnionInputStream.java:145)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at org.eclipse.jgit.util.io.TimeoutInputStream.read(TimeoutInputStream.java:112)
at org.eclipse.jgit.util.IO.readFully(IO.java:246)
at org.eclipse.jgit.transport.PacketLineIn.readLength(PacketLineIn.java:186)
at org.eclipse.jgit.transport.SideBandInputStream.needDataPacket(SideBandInputStream.java:158)
at org.eclipse.jgit.transport.SideBandInputStream.read(SideBandInputStream.java:140)
at org.eclipse.jgit.util.IO.readFully(IO.java:246)
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:373)
at org.eclipse.jgit.transport.BasePackPushConnection.readStatusReport(BasePackPushConnection.java:314)
at org.eclipse.jgit.transport.BasePackPushConnection.doPush(BasePackPushConnection.java:200)
at org.eclipse.jgit.transport.TransportHttp$SmartHttpPushConnection.doPush(TransportHttp.java:811)
at org.eclipse.jgit.transport.BasePackPushConnection.push(BasePackPushConnection.java:152)
at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:165)
at org.eclipse.jgit.transport.Transport.push(Transport.java:1200)
at org.eclipse.egit.core.op.PushOperation.run(PushOperation.java:197)
at org.eclipse.egit.ui.internal.push.PushWizard$PushJob.run(PushWizard.java:297)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

[Updated on: Sun, 22 March 2015 20:51] by Moderator

Re: jgit doesn't handle for http authentication [message #1698020 is a reply to message #1688164] Wed, 10 June 2015 08:45 Go to previous messageGo to next message
Eclipse UserFriend
DeockJin Chung,
Sorry - I don't have an answer for you. Actually, I'm wondering if you found a solution - because I'm encountering the exact same exception!

Although I'm doing exactly the same thing as you (a 'push' to an Apache2 server that has LDAP authentication for the repo path), I'm doing it from within another IDE (Netbeans 8.02). Like with you, doing the same thing from the terminal works just fine.

I posted my question to the jgit-dev mailing list. I have not yet received a response. If anyone has a solution/suggestion (other than 'use the terminal Smile I would much appreciate it.

Best regards,
Tom Wolf
Re: jgit doesn't handle for http authentication [message #1718744 is a reply to message #1698020] Tue, 29 December 2015 11:47 Go to previous messageGo to next message
Eclipse UserFriend
I face the same issue with TFS hosted GIT repo using HTTP authentication.
I am running Eclipse Mars CDT (latest update) on RHEL7.
EGit 4.0.3.201509231615-r
JGit 4.0.3.201509231615-r

eclipse.buildId=4.5.1.M20150904-0015
java.version=1.8.0_65
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -product org.eclipse.epp.package.cpp.product
Command-line arguments: -data file:/opt/software/ -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.cpp.product

org.eclipse.egit.ui
Error
Tue Dec 29 17:32:30 CET 2015
http://tfs-server.domain.com:8080/tfs/.../_git/reponame: authentication not supported

org.eclipse.jgit.api.errors.TransportException: http://tfs-server.domain.com:8080/tfs/.../_git/reponame: authentication not supported
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)
at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:263)
at org.eclipse.egit.core.op.PullOperation$1.run(PullOperation.java:97)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2241)
at org.eclipse.egit.core.op.PullOperation.execute(PullOperation.java:128)
at org.eclipse.egit.ui.internal.pull.PullOperationUI.execute(PullOperationUI.java:140)
at org.eclipse.egit.ui.internal.pull.PullOperationUI$1.runInWorkspace(PullOperationUI.java:115)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.eclipse.jgit.errors.TransportException: http://tfsprod.nestle.com:8080/tfs/EUR/NIHS_BSI_IDP/_git/RiRods: authentication not supported
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:488)
at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:296)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1138)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
... 8 more
Re: jgit doesn't handle for http authentication [message #1718764 is a reply to message #1718744] Tue, 29 December 2015 17:33 Go to previous message
Eclipse UserFriend
Which authentication types is your TFS server supporting ?
JGit currently supports basic and digest authentication.
Previous Topic:Git Repository Failed Due To Java Heap Space Issues
Next Topic: Jgit add "-A" like git
Goto Forum:
  


Current Time: Wed Jul 16 22:01:06 EDT 2025

Powered by FUDForum. Page generated in 0.08550 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top