{"thread":{"id":"14010","subject":"Fwd: difficulties with http proxy","startedAt":"2008-06-18T09:09:28Z","lastAt":"2008-06-19T18:23:52Z","messageCount":2,"participants":["John Yesberg","J. Bruce Fields"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"80210","messageId":"1033a22d0806180209v1cc405e8ob1c176cb2ffc34b8@mail.gmail.com","threadId":"14010","inReplyTo":"1033a22d0806180206g2cf3315bh1e533902fc834ecf@mail.gmail.com","subject":"Fwd: difficulties with http proxy","fromName":"John Yesberg","fromEmail":"john.yesberg@gmail.com","sentAt":"2008-06-18T09:09:28Z","receivedAt":"2008-06-18T09:09:28Z","isPatch":false,"sender":{"key":"john.yesberg@gmail.com","avatar":null},"body":"Hi Bruce\n\nShort version:\n0. Using git on WinXP from\nhttp://msysgit.googlecode.com/files/Git-1.5.5-preview20080413.exe\n1. When a proxy is required, the error message isn't very helpful:\n     Cannot get remote repository information.\n     Perhaps git-update-server-info needs to be run there?\n2. I can't get git config to set the proxy\n3. When I use a shell variable, I can set the proxy, but I still have\ntrouble cloning git over http.\n\nJohn.\n\nLong version:\nI'm back behind my proxy.\nI've tried\n$ git config --global http.proxy http://proxyname:80\nand\n$ git config --global http.proxy proxyname:80\nbut neither seems to work:\n\n$ git clone http://www.kernel.org/pub/scm/git/git.git git2\nInitialized empty Git repository in c:/[path]/git2/.git/\nCannot get remote repository information.\nPerhaps git-update-server-info needs to be run there?\n\nWhen I try\n$ export http_proxy=http://proxyname:80\nthen the following at least starts to work:\n$ git clone http://www.kernel.org/pub/scm/git/git.git git\n\n$ git clone http://www.kernel.org/pub/scm/git/git.git git2\nInitialized empty Git repository in c:/[path]/git2/.git/\ngot 7562b87f6fcfb31a5fa52d2edfe866b5f1ee08d5\nwalk 7562b87f6fcfb31a5fa52d2edfe866b5f1ee08d5\ngot d47c7c24b429eac4bacc107c0b5e2987db40f04a\ngot 71910874a081be5196ae122c8d0b6024ec3afa5e\nwalk d47c7c24b429eac4bacc107c0b5e2987db40f04a\nGetting alternates list for http://www.kernel.org/pub/scm/git/git.git\nGetting pack list for http://www.kernel.org/pub/scm/git/git.git\nGetting index for pack f7be43530c5b167d6eff8e1d4ee72d7c98aa6710\nGetting index for pack 38b949b3b9446f6ef31fe3bc5a70b09cf8cc5c82\nGetting index for pack 535070eccfdc5b080d4b38e682f66b357f3cb4bd\ngot 89fa6d03bc038d6210e94d7fe9fbbffdbc84d883\nGetting index for pack fb9e204382bfea5b1821f19b7a9e82d0e5be8498\ngot 02823413987d5a10364d936327e3a1cfb38cbac2\n\n[snip]\n\nGetting pack 17d608d0bea63b7c5b68bccd1515e9c5ac0961c5\n which contains 859d67990a62049c2f328dfd676cf21da8ff9a27\ngot 1afd0c69ed823f419f52951c3c02dcc50f1a44d1\ngot c824d887420754f98db0553a006865d31d01cf1d\ngot 0b8b0ebba758871ac9c79e729664b5057128e9ac\ngot 18330cdcd2cda94c9c16c02d70229fa16d4aeb33\ngot d8e0a5b843d8c8d02df2150a05f4d9c5928596f4\ngot e051903352f06b0ac9ba1594cd9451baf215bdc5\nerror: Unable to find a2e23c928a11bf526a3c63b34c9a00a94aac6b49 under\nhttp://www.kernel.org/pub/scm/git/git.git\nCannot obtain needed blob a2e23c928a11bf526a3c63b34c9a00a94aac6b49\nwhile processing commit 69cd7c5f72da62a221a740c4d454b29da15186f3.\nrm: cannot remove directory `c:/[path]/git2/.git/clone-tmp': Directory not empty\nrm: cannot remove directory `c:/[path]/git2/.git': Directory not empty\nrm: cannot remove directory `c:/[path]/git2': Directory not empty\n\nIf I try to clone it again, I get a similar, but not identical failure:\n...\nGetting pack 1dbb69127c8efb2534f925b7cf031b0a2428e8b4\n which contains cb4b83de1eb48d163480185da54a828c5bb20941\ngot f1875d3b3de72c1834867ac4d6afe5243f54513e\ngot 347af19febc25fd47db2d11a634c2b38dbfe2c06\ngot 1f405709e7341c27e20c0159fb7c17efbf85975c\ngot 1df4bbf7263a22a2f8c94e0d8bd1d5fbcbab2152\ngot 345943a26466dab73034b41698c54ca317cc4d75\ngot b26b4e34bdfedbe7111dea48b4e5176d10555a76\ngot d6c44a5ed1cd8768a30f9e0e2339bbc49e8fa57e\nerror: Unable to find d69b20549bf956a5c7c3f64f5315a17ec71af038 under\nhttp://www.kernel.org/pub/scm/git/git.git\nCannot obtain needed blob d69b20549bf956a5c7c3f64f5315a17ec71af038\nwhile processing commit d47c7c24b429eac4bacc107c0b5e2987db40f04a.\nrm: cannot remove directory `c:/[path]/git2/.git/clone-tmp': Directory not empty\nrm: cannot remove directory `c:/[path]/git2/.git': Directory not empty\nrm: cannot remove directory `c:/[path]/git2': Directory not empty\n\n\nOn Sat, Jun 14, 2008 at 6:29 PM, J. Bruce Fields <bfields@fieldses.org> wrote:\n>\n> On Sat, Jun 14, 2008 at 02:04:25PM +0100, John Yesberg wrote:\n> > Bruce,\n> >\n> > Sorry, missed your reply in the flood (didn't realise how busy the list\n> > would be). I'll check for more details next time I'm in the office - may be\n> > Wednesday.\n> > Appreciate your concerns; I didn't want newbies (who might be at work) to be\n> > turned off too early in their git experience. I'm sure we can come up with\n> > something suitable.\n>\n> Sure.\n>\n> > I'll try to find out more about why the git config http.proxy isn't working\n> > too.\n>\n> OK, thanks.  Sorry that I don't have more constructive suggestions, but\n> I'm a bit swamped right now.... So I'll expect to hear from you next\n> week and leave thinking about this till then.\n>\n> --b.\n>\n> >\n> > John.\n> >\n> > On Wed, Jun 11, 2008 at 8:58 PM, J. Bruce Fields <bfields@fieldses.org>\n> > wrote:\n> >\n> > > On Wed, Jun 11, 2008 at 08:48:47PM +0100, John Yesberg wrote:\n> > > > ---\n> > > >  Documentation/user-manual.txt |   23 +++++++++++++++++++++++\n> > > >  1 files changed, 23 insertions(+), 0 deletions(-)\n> > >\n> > > Thanks!\n> > >\n> > > >\n> > > > diff --git a/Documentation/user-manual.txt\n> > > b/Documentation/user-manual.txt\n> > > > index bfde507..02b1be0 100644\n> > > > --- a/Documentation/user-manual.txt\n> > > > +++ b/Documentation/user-manual.txt\n> > > > @@ -56,6 +56,16 @@ $ git clone\n> > > > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n> > > >  The initial clone may be time-consuming for a large project, but you\n> > > >  will only need to clone once.\n> > > >\n> > > > +If there is a proxy between you and the repository you want to clone,\n> > > you\n> > > > +may not be able to use the git protocol. But you can use the http\n> > > protocol, by\n> > > > +configuring the proxy. Note that the address to access the repository\n> > > via http\n> > > > +may be different from the git address:\n> > > > +\n> > > > +------------------------------------------------\n> > > > +$ export http_proxy=http://theproxy.example.com:8080\n> > > > +$ git clone http://www.kernel.org/pub/scm/git/git.git\n> > > > +------------------------------------------------\n> > > > +\n> > >\n> > > Especially this early in the manual, I really want to keep the text\n> > > short--we need to get to the basics as quickly as possible--even if that\n> > > means leaving out some corner cases.\n> > >\n> > > What actually happens when you run across this case as a user?  Are\n> > > there any improvements to the error reporting from \"clone\" that would\n> > > lead the user to the right solution without needing to deal with this\n> > > case here?\n> > >\n> > > >  The clone command creates a new directory named after the project (\"git\"\n> > > >  or \"linux-2.6\" in the examples above).  After you cd into this\n> > > >  directory, you will see that it contains a copy of the project files,\n> > > > @@ -129,6 +139,19 @@ $ git branch\n> > > >  * new\n> > > >  ------------------------------------------------\n> > > >\n> > > > +It is possible, particularly on Windows platforms, that as you checkout\n> > > > +the original version, it will in fact be modified, by the autocrlf\n> > > process.\n> > > > +(Windows and Unix store newlines as CRLF and LF respectively, and\n> > > autocrlf\n> > > > +tries to adapt intelligently.) If the checked out version is modified,\n> > > then\n> > > > +trying to switch to a new branch will not work, because then the\n> > > uncommitted\n> > > > +changes would be lost. So you may need to add the +-f+ flag to _force_\n> > > these\n> > > > +changes to be thrown away. Another option might be to edit\n> > > +~/.gitconfig+ or\n> > > > +use the following command to disable the autocrlf function.\n> > > > +\n> > > > +------------------------------------------------\n> > > > ++git config --global core.autocrlf false\n> > > > +------------------------------------------------\n> > > > +\n> > >\n> > > Again, I'd rather not deal with this case in the main text; if we\n> > > absolutely need to, a quick reference to the appropriate documentation\n> > > (\"note: if you see an error like XXX, see the XXX man page...\") might be\n> > > the thing to do.\n> > >\n> > > --b.\n> > >\n> > > >  If you decide that you'd rather see version 2.6.17, you can modify\n> > > >  the current branch to point at v2.6.17 instead, with\n> > > >\n> > > > --\n> > > > 1.5.5.1015.g9d258\n> > >\n"},{"id":"80345","messageId":"20080619182352.GF18557@fieldses.org","threadId":"14010","inReplyTo":"1033a22d0806180206g2cf3315bh1e533902fc834ecf@mail.gmail.com","subject":"Re: difficulties with http proxy","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2008-06-19T18:23:52Z","receivedAt":"2008-06-19T18:23:52Z","isPatch":false,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Wed, Jun 18, 2008 at 10:06:49AM +0100, John Yesberg wrote:\n> Hi Bruce,\n> \n> Short version:\n> 0. Using git on WinXP from\n> http://msysgit.googlecode.com/files/Git-1.5.5-preview20080413.exe\n> 1. When a proxy is required, the error message isn't very helpful:\n>      Cannot get remote repository information.\n>      Perhaps git-update-server-info needs to be run there?\n> 2. I can't get git config to set the proxy\n> 3. When I use a shell variable, I can set the proxy, but I still have\n> trouble cloning git over http.\n\nYeah, looks like git clone could be more helpful, but unfortunately I'm\nprobably not the right person to help:\n\n> John.\n> \n> Long version:\n> I'm back behind my proxy.\n> I've tried\n> $ git config --global http.proxy http://proxyname:80\n> and\n> $ git config --global http.proxy proxyname:80\n> but neither seems to work:\n> \n> $ git clone http://www.kernel.org/pub/scm/git/git.git git2\n> Initialized empty Git repository in c:/[path]/git2/.git/\n> Cannot get remote repository information.\n> Perhaps git-update-server-info needs to be run there?\n\nSo would it be possible for clone to differentiate between the case\nwhere it can't find info/refs (or whatever it's looking for there), and\nthe case where it just can't do any http requests at all?  It's less\nhelpful if the \"git-update-server-info needs to be run\" message is the\nerror users always get.\n\n> \n> When I try\n> $ export http_proxy=http://proxyname:80\n> then the following at least starts to work:\n> $ git clone http://www.kernel.org/pub/scm/git/git.git git\n> \n> $ git clone http://www.kernel.org/pub/scm/git/git.git git2\n> Initialized empty Git repository in c:/[path]/git2/.git/\n> got 7562b87f6fcfb31a5fa52d2edfe866b5f1ee08d5\n> walk 7562b87f6fcfb31a5fa52d2edfe866b5f1ee08d5\n> got d47c7c24b429eac4bacc107c0b5e2987db40f04a\n> got 71910874a081be5196ae122c8d0b6024ec3afa5e\n> walk d47c7c24b429eac4bacc107c0b5e2987db40f04a\n> Getting alternates list for http://www.kernel.org/pub/scm/git/git.git\n> Getting pack list for http://www.kernel.org/pub/scm/git/git.git\n> Getting index for pack f7be43530c5b167d6eff8e1d4ee72d7c98aa6710\n> Getting index for pack 38b949b3b9446f6ef31fe3bc5a70b09cf8cc5c82\n> Getting index for pack 535070eccfdc5b080d4b38e682f66b357f3cb4bd\n> got 89fa6d03bc038d6210e94d7fe9fbbffdbc84d883\n> Getting index for pack fb9e204382bfea5b1821f19b7a9e82d0e5be8498\n> got 02823413987d5a10364d936327e3a1cfb38cbac2\n> \n> [snip]\n> \n> Getting pack 17d608d0bea63b7c5b68bccd1515e9c5ac0961c5\n>  which contains 859d67990a62049c2f328dfd676cf21da8ff9a27\n> got 1afd0c69ed823f419f52951c3c02dcc50f1a44d1\n> got c824d887420754f98db0553a006865d31d01cf1d\n> got 0b8b0ebba758871ac9c79e729664b5057128e9ac\n> got 18330cdcd2cda94c9c16c02d70229fa16d4aeb33\n> got d8e0a5b843d8c8d02df2150a05f4d9c5928596f4\n> got e051903352f06b0ac9ba1594cd9451baf215bdc5\n> error: Unable to find a2e23c928a11bf526a3c63b34c9a00a94aac6b49 under\n> http://www.kernel.org/pub/scm/git/git.git\n> Cannot obtain needed blob a2e23c928a11bf526a3c63b34c9a00a94aac6b49\n> while processing commit 69cd7c5f72da62a221a740c4d454b29da15186f3.\n\nI assume that could just be explained by a race where the repository got\nupdated at the same time you were cloning?  But I wonder why this cleanup\nis failing.\n\n--b.\n\n> rm: cannot remove directory `c:/[path]/git2/.git/clone-tmp': Directory not\n> empty\n> rm: cannot remove directory `c:/[path]/git2/.git': Directory not empty\n> rm: cannot remove directory `c:/[path]/git2': Directory not empty\n> \n> If I try to clone it again, I get a similar, but not identical failure:\n> ...\n> Getting pack 1dbb69127c8efb2534f925b7cf031b0a2428e8b4\n>  which contains cb4b83de1eb48d163480185da54a828c5bb20941\n> got f1875d3b3de72c1834867ac4d6afe5243f54513e\n> got 347af19febc25fd47db2d11a634c2b38dbfe2c06\n> got 1f405709e7341c27e20c0159fb7c17efbf85975c\n> got 1df4bbf7263a22a2f8c94e0d8bd1d5fbcbab2152\n> got 345943a26466dab73034b41698c54ca317cc4d75\n> got b26b4e34bdfedbe7111dea48b4e5176d10555a76\n> got d6c44a5ed1cd8768a30f9e0e2339bbc49e8fa57e\n> error: Unable to find d69b20549bf956a5c7c3f64f5315a17ec71af038 under\n> http://www.kernel.org/pub/scm/git/git.git\n> Cannot obtain needed blob d69b20549bf956a5c7c3f64f5315a17ec71af038\n> while processing commit d47c7c24b429eac4bacc107c0b5e2987db40f04a.\n> rm: cannot remove directory `c:/[path]/git2/.git/clone-tmp': Directory not\n> empty\n> rm: cannot remove directory `c:/[path]/git2/.git': Directory not empty\n> rm: cannot remove directory `c:/[path]/git2': Directory not empty\n> \n> \n> On Sat, Jun 14, 2008 at 6:29 PM, J. Bruce Fields <bfields@fieldses.org>\n> wrote:\n> \n> > On Sat, Jun 14, 2008 at 02:04:25PM +0100, John Yesberg wrote:\n> > > Bruce,\n> > >\n> > > Sorry, missed your reply in the flood (didn't realise how busy the list\n> > > would be). I'll check for more details next time I'm in the office - may\n> > be\n> > > Wednesday.\n> > > Appreciate your concerns; I didn't want newbies (who might be at work) to\n> > be\n> > > turned off too early in their git experience. I'm sure we can come up\n> > with\n> > > something suitable.\n> >\n> > Sure.\n> >\n> > > I'll try to find out more about why the git config http.proxy isn't\n> > working\n> > > too.\n> >\n> > OK, thanks.  Sorry that I don't have more constructive suggestions, but\n> > I'm a bit swamped right now.... So I'll expect to hear from you next\n> > week and leave thinking about this till then.\n> >\n> > --b.\n> >\n> > >\n> > > John.\n> > >\n> > > On Wed, Jun 11, 2008 at 8:58 PM, J. Bruce Fields <bfields@fieldses.org>\n> > > wrote:\n> > >\n> > > > On Wed, Jun 11, 2008 at 08:48:47PM +0100, John Yesberg wrote:\n> > > > > ---\n> > > > >  Documentation/user-manual.txt |   23 +++++++++++++++++++++++\n> > > > >  1 files changed, 23 insertions(+), 0 deletions(-)\n> > > >\n> > > > Thanks!\n> > > >\n> > > > >\n> > > > > diff --git a/Documentation/user-manual.txt\n> > > > b/Documentation/user-manual.txt\n> > > > > index bfde507..02b1be0 100644\n> > > > > --- a/Documentation/user-manual.txt\n> > > > > +++ b/Documentation/user-manual.txt\n> > > > > @@ -56,6 +56,16 @@ $ git clone\n> > > > > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n> > > > >  The initial clone may be time-consuming for a large project, but you\n> > > > >  will only need to clone once.\n> > > > >\n> > > > > +If there is a proxy between you and the repository you want to\n> > clone,\n> > > > you\n> > > > > +may not be able to use the git protocol. But you can use the http\n> > > > protocol, by\n> > > > > +configuring the proxy. Note that the address to access the\n> > repository\n> > > > via http\n> > > > > +may be different from the git address:\n> > > > > +\n> > > > > +------------------------------------------------\n> > > > > +$ export http_proxy=http://theproxy.example.com:8080\n> > > > > +$ git clone http://www.kernel.org/pub/scm/git/git.git\n> > > > > +------------------------------------------------\n> > > > > +\n> > > >\n> > > > Especially this early in the manual, I really want to keep the text\n> > > > short--we need to get to the basics as quickly as possible--even if\n> > that\n> > > > means leaving out some corner cases.\n> > > >\n> > > > What actually happens when you run across this case as a user?  Are\n> > > > there any improvements to the error reporting from \"clone\" that would\n> > > > lead the user to the right solution without needing to deal with this\n> > > > case here?\n> > > >\n> > > > >  The clone command creates a new directory named after the project\n> > (\"git\"\n> > > > >  or \"linux-2.6\" in the examples above).  After you cd into this\n> > > > >  directory, you will see that it contains a copy of the project\n> > files,\n> > > > > @@ -129,6 +139,19 @@ $ git branch\n> > > > >  * new\n> > > > >  ------------------------------------------------\n> > > > >\n> > > > > +It is possible, particularly on Windows platforms, that as you\n> > checkout\n> > > > > +the original version, it will in fact be modified, by the autocrlf\n> > > > process.\n> > > > > +(Windows and Unix store newlines as CRLF and LF respectively, and\n> > > > autocrlf\n> > > > > +tries to adapt intelligently.) If the checked out version is\n> > modified,\n> > > > then\n> > > > > +trying to switch to a new branch will not work, because then the\n> > > > uncommitted\n> > > > > +changes would be lost. So you may need to add the +-f+ flag to\n> > _force_\n> > > > these\n> > > > > +changes to be thrown away. Another option might be to edit\n> > > > +~/.gitconfig+ or\n> > > > > +use the following command to disable the autocrlf function.\n> > > > > +\n> > > > > +------------------------------------------------\n> > > > > ++git config --global core.autocrlf false\n> > > > > +------------------------------------------------\n> > > > > +\n> > > >\n> > > > Again, I'd rather not deal with this case in the main text; if we\n> > > > absolutely need to, a quick reference to the appropriate documentation\n> > > > (\"note: if you see an error like XXX, see the XXX man page...\") might\n> > be\n> > > > the thing to do.\n> > > >\n> > > > --b.\n> > > >\n> > > > >  If you decide that you'd rather see version 2.6.17, you can modify\n> > > > >  the current branch to point at v2.6.17 instead, with\n> > > > >\n> > > > > --\n> > > > > 1.5.5.1015.g9d258\n> > > >\n> >\n"}]}