git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: FW: git via http protocol _and_ a proxy using NTLMauthentication -- git 1.5.4.2 & curl 7.18.0

From
Kken.fuchs@bench.com <ken.fuchs@bench.com>
Date
Feb 27, 2008, 22:10 UTC
Message-ID
<AA28F077645B324881335614E4F7C428034C08@win-ex01.bench.com>
> Ken Fuchs wrote:
Current changes to http.c, get_curl_handle()
        and transport.c, get_refs_via_curl():
> > +       curl_easy_setopt(slot->curl, CURLOPT_PROXYAUTH,
> > (long)CURLAUTH_NTLM);
> > +       curl_easy_setopt(slot->curl, CURLOPT_PROXYUSERPWD,
> > "<user-id>:<password>");
Mike Hommey wrote: 
 
> Starting with curl 7.14.1, you're supposed to be able to use the
> http://user:pass@proxy/ syntax, though I'm not sure it deals well with
> NTLM domains. You can probably leave CURLOPT_PROXYUSERPWD out if you
> set your proxy url correctly.

Leaving out the line above containing CURLOPT_PROXYUSERPWD in both http.c and transport.c and using curl 7.18.0 ...

$ http_proxy=user-id:password@proxy.domain:<port> GIT_CURL_VERBOSE=1 \
    git fetch http://www.kernel.org/pub/scm/git/git.git

fails proxy NTLM authentication. The correct user-id is used, but maybe the password wasn't correctly parsed.

> As for CURLOPT_PROXYAUTH, it would be better to set it from another
> config.
From a later message:
> Or we should set it to CURLOPT_AUTHANY by default.
The code should probably do both.
Show 12 quoted lines
> > * Connection #0 to host <proxy domain> left intact
> > fatal: Couldn't find remote ref HEAD
> > 
> > So, the proxy communication via NTLM authentication seems 
> > to be working.
> > The patch to transport.c did not change anything as far as 
> > I can see.
> > 
> > The fatal error is from remote.c.  Perhaps, it also requires some
> > changes.
> 
> Does your remote have a HEAD ref ?
The command used to generate the above output is:
$ GIT_CURL_VERBOSE=1 git fetch \
  http://www.kernel.org/pub/scm/git/git.git

I originally tried the following command as suggested by the git home page for getting "git by git".

$ GIT_CURL_VERBOSE=1 git clone \
  http://www.kernel.org/pub/scm/git/git.git
Initialized empty Git repository in /mnt/s2u1/git/test-git/git/.git/
Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?
$

This seemed like a good test for validating my git installation, but this command doesn't access the proxy at all. The fetch command does. Why the difference?

Thanks,
Ken Fuchs
Next: Mike Hommey
Message 1 of 2 in “RE: FW: git via http protocol _and_ a proxy using NTLMauthentication -- git 1.5.4.2 & curl 7.18.0”
  1. ken.fuchs@bench.comFeb 27, 2008
  2. Mike HommeyFeb 27, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.