Creating a password protected YUM repository
Setup http authentication in httpd.conf file (encouraged rather than using .htaccess):
<Directory /var/www/repo> AuthType Basic AuthName "Password Required" AuthUserFile /etc/apache2/passwords/repo Require valid-user </Directory>
Create auth user password file:
htpasswd -c /etc/apache2/passwords/repo repouser
Restart apache.
Create repo:
yum install createrepo # or equivalent mkdir /var/www/repo cp *.rpm /var/www/repo createrepo /var/www/repo
To use the repo, on the client system in /etc/yum.repo.d/<reponame>.repo, have:
baseurl=http://repouser:password@server/repo

[...] because it’s too big a topic, but it’s not hard at a basic level, and you can follow these instructions to set up password protection for the root of the directory tree where you’re going to put [...]