1 |
On Mon, Mar 23, 2009 at 3:33 PM, Timothy Redaelli <drizzt@g.o> wrote: |
2 |
> Hi, |
3 |
> Some repositories has the git (or svn) and http support. I saw that we choose |
4 |
> the git/svn one (it's faster i know, but it does not works under proxy). |
5 |
> |
6 |
> I propose a E{GIT,SVN}_REPO_HTTP_URI (or similar) variable that uses the http |
7 |
> variant when the global use is set (or we can use the http_proxy env |
8 |
> variable). |
9 |
> |
10 |
> What do you think? |
11 |
|
12 |
Here's what I did: |
13 |
|
14 |
Install net-misc/connect |
15 |
Save the script below and do `export GIT_PROXY_COMMAND=/path/to/script` |
16 |
set http_proxy, and everything works dandy. |
17 |
|
18 |
Maybe this can be done inside the eclass if http_proxy is set? :) |
19 |
|
20 |
---- |
21 |
|
22 |
proxy=${http_proxy#http://} |
23 |
host=${proxy##*@} |
24 |
auth=${proxy%@*} |
25 |
if test "${auth}" != "${proxy}"; then |
26 |
export HTTP_PROXY_USER=${auth%%:*} |
27 |
export HTTP_PROXY_PASSWORD=${auth##*:} |
28 |
fi |
29 |
connect -H ${host} $1 $2 |
30 |
|
31 |
|
32 |
|
33 |
|
34 |
-- |
35 |
~Nirbheek Chauhan |