{"thread":{"id":"1321","subject":"Using git with http behind proxy with authentification?","startedAt":"2005-07-23T10:21:39Z","lastAt":"2005-07-25T22:14:33Z","messageCount":2,"participants":["Dirk Behme","Darrin Thompson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"6379","messageId":"42E21A33.6010804@de.bosch.com","threadId":"1321","inReplyTo":null,"subject":"Using git with http behind proxy with authentification?","fromName":"Dirk Behme","fromEmail":"dirk.behme@de.bosch.com","sentAt":"2005-07-23T10:21:39Z","receivedAt":"2005-07-23T10:21:39Z","isPatch":false,"sender":{"key":"dirk.behme@de.bosch.com","avatar":null},"body":"Hi,\n\nbecause I'm sitting behind a firewall I have to use cogito/git using \nhttp. But http proxy needs special authentification with user & \npassword. It seems to me that this isn't supported with recent cogito/git?\n\nIn the past, for bk I used\n\n$ export http_proxy=http://user:password@someproxy.some.where:8080/\n\nwhich worked. But no luck with cogito/git.\n\nLooking into recent cogito/git, the reason for this seems to be that \ncogito/git uses a combination of wget in scripts and curl in compiled \nexecutables. Having a look to cg-pull script, this script uses wget. \nThen, it calls git-http-pull if it thinks that http should be used. \nLooking at http-pull.c shows that there curl is used for http access. If \nI understand it correctly from man pages, wget understands user:password \nsyntax of http_proxy environment, but curl doesn't. As I understand it \ncurl understands only 'someproxy.some.where:8080' and wants the user and \npassword given as parameter of curl_easy_setopt. The curl_easy_setopt \nman page tells something about CURLOPT_PROXYUSERPWD parameter.\n\nAny ideas?\n\nMany thanks\n\nDirk\n"},{"id":"6444","messageId":"1122329673.4378.4.camel@localhost.localdomain","threadId":"1321","inReplyTo":"42E21A33.6010804@de.bosch.com","subject":"Re: Using git with http behind proxy with authentification?","fromName":"Darrin Thompson","fromEmail":"darrint@progeny.com","sentAt":"2005-07-25T22:14:33Z","receivedAt":"2005-07-25T22:14:33Z","isPatch":false,"sender":{"key":"darrint@progeny.com","avatar":null},"body":"On Sat, 2005-07-23 at 12:21 +0200, Dirk Behme wrote:\n> In the past, for bk I used\n> \n> $ export http_proxy=http://user:password@someproxy.some.where:8080/\n> \n> which worked. But no luck with cogito/git.\n> \n> Looking into recent cogito/git, the reason for this seems to be that \n> cogito/git uses a combination of wget in scripts and curl in compiled \n> executables. Having a look to cg-pull script, this script uses wget. \n> Then, it calls git-http-pull if it thinks that http should be used. \n> Looking at http-pull.c shows that there curl is used for http access. If \n> I understand it correctly from man pages, wget understands user:password \n> syntax of http_proxy environment, but curl doesn't. As I understand it \n> curl understands only 'someproxy.some.where:8080' and wants the user and \n> password given as parameter of curl_easy_setopt. The curl_easy_setopt \n> man page tells something about CURLOPT_PROXYUSERPWD parameter.\n> \n\nFor git itself everything is curl only now as far as I know. That's new\nas of hours after you sent this.\n\nGit turns on .netrc for doing 401 http auth. I wonder if curl will\nconsult .netrc for 407 proxy credentials as well?\n\nSomebody would have to read code and/or try it.\n\n--\nDarrin\n"}]}