[Yum] Still hopeless on getting proxy to work

Sean Dilda agrajag at dragaera.net
Thu Feb 23 18:06:04 UTC 2006


mbylander at legionaries.org wrote:
> Hi all,
> 
> I've been fiddling a lot trying to get the proxy to work. I found out that if I create a local repository using wget and remove the proxy information from yum.conf, the "download" still fails because it is trying to use the http_proxy environment variable. With this unset, it is able to update from a local repository.
> 
> So, I reasoned, maybe there's something that python or yum doesn't like about the standard http://username:password@host:port/ format, so I wrote a wrapper that unsets the environment variables to see if that makes things work. For the record, here is my wrapper (yumwrap):
> 
> #!/bin/sh
> http_proxy=
> HTTP_PROXY=
> ftp_proxy=
> FTP_PROXY=
> yum $1 $2
> 

This script does nothing.  You didn't export the variables you set, so 
the original values are what is passed to yum, not the cleared values. 
Try something like this:

#!/bin/sh
http_proxy=
HTTP_PROXY=
ftp_proxy=
FTP_PROXY=
export http_proxy
export HTTP_PROXY
export ftp_proxy
export FTP_PROXY
yum $1 $2

Of course I've never played with the proxy stuff, so I've no idea if 
those environment variables do anything or not.  Just thought you'd want 
to know you needed a bit more for the script to work the way you want.



More information about the Yum mailing list