{"thread":{"id":"12347","subject":"RE: FW: git via http protocol _and_ a proxy using NTLMauthentication -- git 1.5.4.2 & curl 7.18.0","startedAt":"2008-02-27T22:10:57Z","lastAt":"2008-02-27T22:55:34Z","messageCount":2,"participants":["ken.fuchs@bench.com","Mike Hommey"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"70164","messageId":"AA28F077645B324881335614E4F7C428034C08@win-ex01.bench.com","threadId":"12347","inReplyTo":null,"subject":"RE: FW: git via http protocol _and_ a proxy using NTLMauthentication -- git 1.5.4.2 & curl 7.18.0","fromName":"","fromEmail":"ken.fuchs@bench.com","sentAt":"2008-02-27T22:10:57Z","receivedAt":"2008-02-27T22:10:57Z","isPatch":false,"sender":{"key":"ken.fuchs@bench.com","avatar":null},"body":"> Ken Fuchs wrote:\n\nCurrent changes to http.c, get_curl_handle()\n        and transport.c, get_refs_via_curl():\n\n> > +       curl_easy_setopt(slot->curl, CURLOPT_PROXYAUTH,\n> > (long)CURLAUTH_NTLM);\n> > +       curl_easy_setopt(slot->curl, CURLOPT_PROXYUSERPWD,\n> > \"<user-id>:<password>\");\n\nMike Hommey wrote: \n \n> Starting with curl 7.14.1, you're supposed to be able to use the\n> http://user:pass@proxy/ syntax, though I'm not sure it deals well with\n> NTLM domains. You can probably leave CURLOPT_PROXYUSERPWD out if you\n> set your proxy url correctly.\n\nLeaving out the line above containing CURLOPT_PROXYUSERPWD in both\nhttp.c and transport.c and using curl 7.18.0 ...\n\n$ http_proxy=user-id:password@proxy.domain:<port> GIT_CURL_VERBOSE=1 \\\n    git fetch http://www.kernel.org/pub/scm/git/git.git\n\nfails proxy NTLM authentication.  The correct user-id is used,\nbut maybe the password wasn't correctly parsed.\n\n> As for CURLOPT_PROXYAUTH, it would be better to set it from another\n> config.\nFrom a later message:\n> Or we should set it to CURLOPT_AUTHANY by default.\n\nThe code should probably do both.\n\n> > * Connection #0 to host <proxy domain> left intact\n> > fatal: Couldn't find remote ref HEAD\n> > \n> > So, the proxy communication via NTLM authentication seems \n> > to be working.\n> > The patch to transport.c did not change anything as far as \n> > I can see.\n> > \n> > The fatal error is from remote.c.  Perhaps, it also requires some\n> > changes.\n> \n> Does your remote have a HEAD ref ?\n\nThe command used to generate the above output is:\n\n$ GIT_CURL_VERBOSE=1 git fetch \\\n  http://www.kernel.org/pub/scm/git/git.git\n\nI originally tried the following command as suggested by the git\nhome page for getting \"git by git\".\n\n$ GIT_CURL_VERBOSE=1 git clone \\\n  http://www.kernel.org/pub/scm/git/git.git\nInitialized empty Git repository in /mnt/s2u1/git/test-git/git/.git/\nCannot get remote repository information.\nPerhaps git-update-server-info needs to be run there?\n$\n\nThis seemed like a good test for validating my git installation,\nbut this command doesn't access the proxy at all.  The fetch\ncommand does.  Why the difference?\n\nThanks,\n\nKen Fuchs\n"},{"id":"70173","messageId":"20080227225534.GA16778@glandium.org","threadId":"12347","inReplyTo":"AA28F077645B324881335614E4F7C428034C08@win-ex01.bench.com","subject":"Re: FW: git via http protocol _and_ a proxy using NTLMauthentication -- git 1.5.4.2 & curl 7.18.0","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2008-02-27T22:55:34Z","receivedAt":"2008-02-27T22:55:34Z","isPatch":false,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Wed, Feb 27, 2008 at 04:10:57PM -0600, Ken.Fuchs@bench.com wrote:\n> The command used to generate the above output is:\n> \n> $ GIT_CURL_VERBOSE=1 git fetch \\\n>   http://www.kernel.org/pub/scm/git/git.git\n> \n> I originally tried the following command as suggested by the git\n> home page for getting \"git by git\".\n> \n> $ GIT_CURL_VERBOSE=1 git clone \\\n>   http://www.kernel.org/pub/scm/git/git.git\n> Initialized empty Git repository in /mnt/s2u1/git/test-git/git/.git/\n> Cannot get remote repository information.\n> Perhaps git-update-server-info needs to be run there?\n> $\n> \n> This seemed like a good test for validating my git installation,\n> but this command doesn't access the proxy at all.  The fetch\n> command does.  Why the difference?\n\ngit-clone is not a builtin yet. When it is (and a patch has come for\nthat), it will correctly use proxys.\n\nMike\n"}]}