Using Basic HTTP authentication with a port other than 80

"Flavin, Kyle (NBCUniversal)" <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <FA3F624E74BEA942B178E32FD5225A0D0CD9BD45@UCTMLVEM01.e2k.ad.ge.com>
I've run into an issue configuring a Yum repository which I'm serving up
with HTTP/Apache.

 

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):

 

baseurl=http://user:password@<my-ip>:<my-non-80-port>/yum/RHEL/7/base/$b
asearch/

 

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:

 

[Errno 14] HTTP Error 401: Authorization Required

 

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.

 

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).

 

Is there any workaround for this in older versions of yum?

 

Thanks.

_______________________________________________
Yum mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.