Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » JGit: HTTPS links over a proxy that requires authentication
JGit: HTTPS links over a proxy that requires authentication [message #1760610] Fri, 28 April 2017 19:53 Go to next message
Erika Redmark is currently offline Erika RedmarkFriend
Messages: 22
Registered: January 2013
Junior Member
I am trying to make an RCP application, that downloads data files for proper operation from our git repository, proxy-aware. Right now, I have basic proxy settings (host/port) for HTTP, HTTPS, and SSH working. The application can execute clones and updates/pulls and I am using CCProxy to test and confirm that they are indeed being routed through that successfully. This uses the standard http/https.proxyHost and http/https.proxyPort variables.

However, the problems come in when I configure CCProxy to require username/password authentication. Note that I have already tested with Firefox that the username/password are working and it goes through the proxy properly, so the proxy is properly set up.

As for JGit and the application itself, I have an authenticator set up as this answer shows: http://stackoverflow.com/questions/1626549/authenticated-http-proxy-with-java/16340273#16340273

Once I did that, http.proxyUser and http.proxyPassword got through the proxy for an http: link (sending the clone/update commands an http: based repo link).

CCProxy monitor showed the request being routed successfully through the proxy.

However, when I use a url with https, not just http, for the clone/update operations I need, suddenly it stops working. I confirmed that the method getPasswordAuthentication isn't even being called, period.

My question is
1) Is this supposed to happen? If not then I may have something funny going on in the way I am using JGit
2) Otherwise, where exactly would I tell JGit to use proxy username/password information when the repository URL is being requested over HTTPS? I know it picks up host and port already for the proxy, and I know it has no problems with HTTP, and I am under the understanding that it uses the java.net libraries anyway so I figure it is just delegating to them and whatever makes them work with proxies will make JGit work with proxies, but I am completely stumped here. I don't know why with an https: style repository url it is skipping the configuration for a username/password for the proxy.
Re: JGit: HTTPS links over a proxy that requires authentication [message #1761916 is a reply to message #1760610] Thu, 11 May 2017 19:42 Go to previous messageGo to next message
Erika Redmark is currently offline Erika RedmarkFriend
Messages: 22
Registered: January 2013
Junior Member
Bump.

When I go back to that analysis and if I figure it out myself I will post it here, but it would be nice if someone could give any kind of clue or hint or some place to look first, even if not a full answer.
Re: JGit: HTTPS links over a proxy that requires authentication [message #1765375 is a reply to message #1761916] Thu, 08 June 2017 20:09 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 944
Registered: July 2009
Senior Member
Is your server using https certificates your JVM trusts ? You may try to set http.sslverify=false to see if this is the root cause of your problem.
Previous Topic:GIT Team Provider Option not Showing up
Next Topic:Show Annotations option disappeared
Goto Forum:
  


Current Time: Tue Sep 26 03:58:21 GMT 2017

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

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