# Emerge and http proxy

## Bitwaba

Hi, 

I'm trying to emerge through an http proxy at work.

I read this thread:

https://forums.gentoo.org/viewtopic-t-393112-highlight-emerge+proxy.html

and followed the instructions about adding it as an environment variable:

```

# echo http_proxy="hlsccvs:3128" >> /etc/env.d/10proxy

# echo ftp_proxy="hlsccvs:3128" >> /etc/env.d/10proxy

```

I was able to download portage from the web with links2 by setting the http proxy, but when i run emerge --sync, i get:

```

livecd / # emerge --sync

>>> starting rsync with rsync://64.127.121.98/gentoo-portage...

>>> checking server timestamp ...

rsync: failed to connect to 64.127.121.98: Connection refused

rsync error: error in socket IO (code 10) at clientserver.c(88)

```

When I type "export", i have :

```

livecd / # export

declare -x CONFIG_PROTECT_MASK="/etc/terminfo"

declare -x CVS_RSH="ssh"

declare -x EDITOR="/bin/nano"

declare -x GCC_SPECS=""

declare -x GUILE_LOAD_PATH="/usr/share/guile/1.6"

declare -x G_BROKEN_FILENAMES="1"

declare -x HOME="/root"

declare -x INFOPATH="/usr/share/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.15.92.0.2/info: /usr/share/gcc-data/i686-pc-linux-gnu/3.3.5-20050130/info"

declare -x LESS="-R"

declare -x LESSOPEN="|lesspipe.sh %s"

declare -x LOGNAME="root"

declare -x MAIL="/var/mail/root"

declare -x MANPATH="/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.15.92.0.2/man: /usr/share/gcc-data/i686-pc-linux-gnu/3.3.5-20050130/man"

declare -x OLDPWD

declare -x PAGER="/usr/bin/less"

declare -x PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin: /usr/i686-pc-linux-gnu/gcc-bin/3.3.5-20050130"

declare -x PWD="/"

declare -x PYTHONPATH="/usr/lib/portage/pym"

declare -x SHELL="/bin/bash"

declare -x SHLVL="2"

declare -x SSH_CLIENT="::ffff:10.0.6.21 2711 22"

declare -x SSH_CONNECTION="::ffff:10.0.6.21 2711 ::ffff:10.0.6.24 22"

declare -x SSH_TTY="/dev/pts/0"

declare -x TERM="xterm"

declare -x USER="root"

declare -x ftp_proxy="hlsccvs:3128"

declare -x http_proxy="hlsccvs:3128"

```

So the variable is set, but Emerge doesn't seem to want to use it.

If i try to emerge a package:

```

livecd / # emerge vim

Calculating dependencies ...done!

>>> emerge (1 of 4) dev-util/ctags-5.5.4-r2 to /

>>> Downloading http://distfiles.gentoo.org/distfiles/ctags-5.5.4.tar.gz

Error parsing proxy URL [b]hlsccvs:3128[/b]: Unsupported scheme.

>>> Downloading http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/ctags-5.5.4.tar.gz

Error parsing proxy URL [b]hlsccvs:3128[/b]: Unsupported scheme.

```

continues for another 15 or so tarballs...

It looks like emerge can see the proxy variable, but doesnt want to (or can't) download anything.

Anyone have any ideas how to get this to work?

Edit: Split various long lines up to stop the post breaking the pagelayout. --Maedhros

----------

## Maedhros

Does it work if you put 'http://' in front of the proxy address?

Moved from Portage & Programming to Networking & Security.

----------

## Bitwaba

Thanks, that got it to work.  It can install packages, and emerge-webrsync works, but emerge --sync still doesn't.  I guess everytime i have to update my portage tree i can just websync it.

----------

