将 Mercurial 设置为仅适用于已通过我的服务器进行身份验证的用户?
我有一个 Mercurial 服务器设置,想用它来对 Apache 进行源代码控制。然而,我遵循的设置要求我有一个 .htpasswd,它用于验证 Mercurial 用户的身份。 是否可以让这个经过身份验证的列表成为服务器上已经是用户的人员,这样他们就不必创建新的 ID 和密码?
I have a Mercurial server setup and would like to use it for source control over Apache. The setup i followed, however, requires that I have a .htpasswd which it uses to authenticate Mercurial users.
Is it possible to have this authenticated list be the people who are already users on the server so they don't have to create new id's and passwords?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当然。这是 Mercurial 的优势之一。当作为 CGI(或 wsgi)运行时,它完全信任 REMOTE_USER 环境变量。因此,只需在运行 ScriptAlias(或 wsgi)之前让 apache 设置 REMOTE_USER,mercurial 就会使用该身份验证。 Apache 有许多不同的身份验证模块,可以与您已有的任何用户/密码系统进行交互。
Certainly. This is one of mercurial's strengths. When run as a CGI (or wsgi) it entirely trusts the REMOTE_USER environment variable. So just have apache set REMOTE_USER before running the ScriptAlias (or wsgi) and mercurial will use that authentication. Apache has many different authentication modules to interface with any user/pass system you already have.