<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>I've run into an issue configuring a Yum repository which I'm serving up with HTTP/Apache.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I want to use http basic authentication, and set the listening port on my apache server to something other than 80, because this repo is in my DMZ.  I was trying to do that by setting up my baseurl as follows (from my client repo file):<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>baseurl=http://user:password@<my-ip>:<my-non-80-port>/yum/RHEL/7/base/$basearch/<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The documentation for yum.conf indicates you can do basic http authentication by adding the username/password to the URL as I did above.  However, with that baseurl, I get the following error when I do a “yum search mysql” from the client:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>[Errno 14] HTTP Error 401: Authorization Required<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>When I set the listening port on the server back to 80, and remove the port specification in the client’s repo file, it works.  This indicates to me that the extra ":" specifying the port confuses yum’s parsing of my URL.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>So it appears you cannot do basic http authentication AND change the port number that the web server listens on.  I noticed that there are “username” and “password” directives in newer versions of Yum, but my version doesn't appear to have these directives (I am running yum-3.2.22-37.0.1.el5, and I just noticed those two directives first appear in 3.2.29).<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Is there any workaround for this in older versions of yum?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>