[CentOS] yum proxy username with @ character

Shawn K. O'Shea shawn at ll.mit.edu
Thu Sep 13 17:46:17 UTC 2007



Brad Beyenhof wrote:
> Clint Dilks wrote:
>> http_proxy understands the format <username>:<password>@<my 
>> proxy>:<proxy port> so in this case the @ is probably being 
>> interpreted as server identifier.  I would try enclosing the user 
>> name in single quotes or adding a \ before the @.  If these do not 
>> work your only option may be to contact the proxy admin and obtain a 
>> username without the @
>
> If putting '\@' to escape the at sign didn't work, have you tried 
> using the URL escape code of '%40' to represent it?
>
I was really curious about this, so I googled around a bit. I don't know 
about the support in the environment variables, but from what I'm 
reading, the "%40" encoding should definitely work if you use the proxy 
variables in yum.conf, ie:
proxy=http://proxyserver.somedomain.local:portnum/
proxy_username=username%40stuffafteratsymbol
proxy_password=password

This should at a minimum be true for CentOS 4.5 since I cracked open the 
python on my box to see exactly what the proxy code was doing :)

-Shawn



More information about the CentOS mailing list