Yum client configuration: how to use basic authentication with a port other than 80?

I'm having a problem setting up the Yum repository that I serve using HTTP / Apache.

I want to use http basic authentication and set the listening port to something other than 80 because this repo is in my DMZ. I tried to do this by installing my baseurl as follows (from my repo file):

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

The documentation for yum.conf indicates that you can perform basic HTTP authentication by adding a username / password to the URL, as I did above. I get the following error when I try to do yum search mysqlwith the client:

[Errno 14] HTTP Error 401: Authorization Required

This indicated that the extra ":" indicating the port was confusing the yum analysis of my URL. I removed the port, installed the server back on port 80, and it works.

So, you cannot perform basic HTTP authentication and change the port number that the web server is listening on. I have noticed that there are directives username, and passwordthe new version of Yum, but my version does not have these directives (I run yum-3.2.22-37.0.1.el5). Is there a workaround for this?

+3
source share
1 answer

I worked on this by disabling plugins by adding the following line to the yum configuration.

plugins=0

, , yum updater baseurl, (, fastmirror) . , , , , , . , .

0

All Articles