Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Problem with exception for ls-remote(My setings seem to work, but not for EGit)
Problem with exception for ls-remote [message #949103] Thu, 18 October 2012 17:43 Go to next message
Alex Mising name is currently offline Alex Mising nameFriend
Messages: 149
Registered: March 2010
Senior Member
Hello all,

I have a rather unusual problem with my proxy settings. They seem to work for installing plugins (Help -> Install new software) but when I try to access a git repository I get an authentication error.

I have configured my Eclipse as follows:

1) In eclipse.ini I added the VM arguments:

-Dhttp.proxyHost=myproxy.server.com
-Dhttp.proxyPort=myProxyPort
-Dhttp.proxyUser=myProxyUsername
-Dhttp.proxyPassword=myProxyPassword
-Dhttps.proxyHost=myproxy.server.com
-Dhttps.proxyPort=myProxyPort
-Dhttps.proxyUser=myProxyUsername
-Dhttps.proxyPassword=myProxyPassword


2) In Window->Preferences->Network connections

* Provider is "Manual"
* HTTP and HTTPS are set to the same values as eclipse.ini
* SOCKS is cleared (we don't have a SOCKS proxy)

Now, when I try to access remote update site to check for updates, or to install new plugins, everything works fine.

When I try to access a repository on github via HTTP I get a proxy authentication error:

Exception caught during execution of ls-remote command: http://github.com/git/git.git: 407 Proxy Authentication Required


The same happens if I try using HTTPS:

Exception caught during execution of ls-remote command: https://github.com/git/git.git: 407 Proxy Authentication Required


I've reviewed my username and password again and again, but they can't be wrong because install/update does not seem to have problems. Any ideas what else I could check?

Thanks

P.S. Our corporate proxy is your usual NTLM abomination. I don't have any ".gitconfig" settings in my home (a Linux system).
Re: Problem with exception for ls-remote [message #953514 is a reply to message #949103] Mon, 22 October 2012 10:04 Go to previous messageGo to next message
Matthew Webber is currently offline Matthew WebberFriend
Messages: 198
Registered: December 2010
Senior Member
Can you clone the repository from the command line (i.e. outside Eclipse)?
Re: Problem with exception for ls-remote [message #954866 is a reply to message #953514] Tue, 23 October 2012 10:07 Go to previous messageGo to next message
Alex Mising name is currently offline Alex Mising nameFriend
Messages: 149
Registered: March 2010
Senior Member
Hello Matthew,

I did not actually have git installed at all. In any case, I am intrigued so I just built it from source to see what happens:

Here's the result:

[user@host:~/t]$ git --version
git version 1.7.12-rc0

[user@host:~/t]$ git config -l
http.proxy=http://myuser:mypass@proxy.domain.com:8085/
user.name=myuser
user.email=myemail

[user@host:~/t]$ git clone http://github.com/git/git.git
Cloning into 'git'...
error: The requested URL returned error: 407 while accessing http://github.com/git/git.git/info/refs
fatal: HTTP request failed

[user@host:~/t]$ git clone https://user@bitbucket.org/user/some-repo.git
Cloning into 'some-repo'...
Password for 'https://user@bitbucket.org': 
error: Proxy CONNECT aborted while accessing https://user@bitbucket.org/user/some-repo.git/info/refs
fatal: HTTP request failed


For the command-line trial I have:

1) export http_proxy=http://myuser:mypass@proxy.domain.com:8085/
2) Same setting in my .gitconfig file (see 'git config -l' above)

Interestingly, it appears like when I try to access my bitbucket account I get prompted for the password, but as soon as I authenticate with bitbucket the next request seems to get the 407 error...

[Updated on: Tue, 23 October 2012 10:10]

Report message to a moderator

Re: Problem with exception for ls-remote [message #954875 is a reply to message #954866] Tue, 23 October 2012 10:18 Go to previous message
Alex Mising name is currently offline Alex Mising nameFriend
Messages: 149
Registered: March 2010
Senior Member
I would also add this piece of information:

I have resorted to installing ntlmaps: http://ntlmaps.sourceforge.net/

It listens on localhost:5865 and relays through the proxy that git fails to use directly.

This works like a charm.

Same user/password and proxy server that gives me the 407 when configured directly in git (but works for firefox, Eclipse install/update and everything else I've tried). The detailed config is:

PARENT_PROXY:proxy.domain.com
PARENT_PROXY_PORT:8085
NT_DOMAIN:mydomain
USER:myuser
PASSWORD:mypass

# These two options replace old FULL_NTLM option.
# NTLM authentication consists virtually of two parts: LM and NT. Windows95/98 use
# only LM part, WindowsNT/2000 can use NT and LM or just NT part.
# Almost always using just LM part will be enough. I had several reports
# about LM and NT requirement and no about just NT.
# So try to setup 1, 1 only if you have enough reasons to do so and when you understand
# what you are doing.
# 0, 0 is an illegal combination
# NOTE: if you change these options then you have to setup flag option accordingly.
LM_PART:1
NT_PART:1

# Highly experimental option. See research.txt for details.
# LM - 06820000
# NT - 05820000
# LM + NT - 07820000
NTLM_FLAGS: 07820000


The only interesting bits is that I specify a domain and use LM+NT method (which I modified since the default was LM only) that the comments seem to indicate are "experimental" (whatever that means).

P.S. The research.txt file only mentions:
NTLM_FLAGS: some_hex_digits forces APS to use custom NTLM flags during the authentication.
For now it is known very little on their effects. So this option may be of use for
better understanding of NTLM authentication method.

[Updated on: Tue, 23 October 2012 10:22]

Report message to a moderator

Previous Topic:Importing projects from git using new project wizard
Next Topic:Patches do not end with new line
Goto Forum:
  


Current Time: Fri Mar 15 05:38:45 GMT 2024

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

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

Back to the top