使用基本身份验证设置私人yum回购 [英] Set up private yum repo with basic auth

查看:119
本文介绍了使用基本身份验证设置私人yum回购的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了自己的私人百胜仓库.这是一个将Apache作为Web服务器的HTTP基本存储库,因此我想添加某种身份验证.这是我需要使用Apache进行的操作,还是可以使用createrepo库来指定用户名和密码? 最终目标是拥有几个存储库:

Dev-Repo,QA-Repo,Staging-Repo和Production-Repo

我希望开发人员仅能访问dev-repo,对QA只能访问QA-Repo,等等...

解决方案

要在服务器端设置基本身份验证,请遵循 https://serverfault.com/Questions/609548/yum-repo-basic-auth-not-working ).

I have set my own private yum repo. This is an HTTP base repo with a Apache as a web server, so I would like to add some kind of authentication. Is this something I need to do with Apache or is there anything I can do with the createrepo library to specify a user-name and password? The final goal is to have several repos:

Dev-Repo, QA-Repo, Staging-Repo, and Production-Repo

I want developers to have access to only the dev-repo, have QA access only QA-Repo and so on...

解决方案

To setup basic auth on server side, follow http://httpd.apache.org/docs/2.2/howto/auth.html#gettingitworking (paths might differ - they surely do on mine Fedora installation).

To setup yum to consume that repo you can add either:

baseurl=http://user:pass@example.com/myrepo/Dev-Repo

or:

username=user
password=pass

to repo's config /etc/yum.repos.d/myrepo-DevRepo.repo (taken from https://serverfault.com/questions/609548/yum-repo-basic-auth-not-working).

这篇关于使用基本身份验证设置私人yum回购的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆