我正在尝试使用 Apache http 配置 mercurial 访问。它需要身份验证。我的/etc/apache2/sites-enabled/mercurial
看起来像这样:
NameVirtualHost *:8080
<VirtualHost *:8080>
UseCanonicalName Off
ServerAdmin webmaster@localhost
AddHandler cgi-script .cgi
ScriptAliasMatch ^(.*) /usr/lib/cgi-bin/hgwebdir.cgi/$1
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
我在互联网上阅读的每个教程都告诉我插入这些行:
AuthType Basic
AuthUserFile /usr/local/etc/httpd/users
Run Code Online (Sandbox Code Playgroud)
但是当我这样做时,我收到以下错误:
# /etc/init.d/apache2 reload
Syntax error on line 8 of /etc/apache2/sites-enabled/mercurial:
AuthType not allowed here
Run Code Online (Sandbox Code Playgroud)
我的发行版是一个定制的 Ubuntu,称为 Turnkey Linux Redmine
httpd authentication mercurial http-authentication apache-2.2
我正在评估将我的组织转移到 Mercurial 的可能性,但是我遇到了两个基本要求,我找不到合适的指针。
我如何设置 Mercurial 的中央存储库以使用中央 Active Directory 对用户进行身份验证,并且只允许他们在拥有正确凭据的情况下进行推送或拉取?
如何设置 Mercurial 项目存储库以仅允许属于特定组的用户推送/拉取源代码?我们需要这个来获得每个项目的授权。
在哪些 HTTP 服务器(IIS 或 Apache 等)上支持上述两个要求?
如果我问的是一些明显的问题,或者我遗漏了有关身份验证和授权工作原理的一些基本知识,我深表歉意。
我可以设置 Mercurial 来验证 Active Directory 上的用户吗?就我而言,hg 可以在 Windows、Linux 或 FreeBSD 上运行,但我需要使用 AD 用户。
注意:如果可能的话,请给我指一个教程。
我们只是切换到我这周工作的 Mercurial。我开始阅读材料,并希望有人能简洁地回答这个问题:
Mercurial 的“tip”标签和“default”分支有什么区别?
这与这个问题有些相关,但又是一个不同的问题。
我们有一个中央 Hg 存储库,通过 SSH 和mercurial-server为用户提供服务。我们有许多 Mac、Linux 和 Windows 客户端连接到它。
现在已经发生了两次,其中一个 Windows 用户损坏了他们的存储库,然后又被推回了破坏它的中央用户。我想在中央存储库上编写一个传入的钩子脚本,以防止交易被接受,如果它会破坏中央存储库。
虽然不幸的是我对 Mercurial 的了解不够,无法编写这样的脚本。其他人有没有遇到过这种情况?我个人不太确定为什么 hg 默认不这样做。
我有使用 mod_wsgi 在 Apache 上运行的 Mercurial 存储库。存储库的所有文件名都以 windows-1251 编码。这种编码用于历史原因:它们从 svn 转换为 mercurial,windows-1251 是俄罗斯语言环境的默认 windows 编码。
现在程序员想要使用Crucible工具进行代码审查。它不能用除 utf-8 以外的任何其他编码对文件名进行undersand。所以我需要将它们从 windows-1251 转换为 utf-8。有谁知道如何做到这一点?Mercurial 转换扩展没有转换编码的选项。
hgweb.config:
[web]
#encoding = UTF-8
encoding = windows-1251
#allow_archive = gz, zip, bz2
allow_archive = zip
allow_push = *
push_ssl = false
[extensions]
[collections]
/data/mercurial = /data/mercurial
Run Code Online (Sandbox Code Playgroud) 我想在 Windows 2008 服务器上设置一个中央 Mecurial 存储库,它只允许对某些用户进行推送和拉取访问。这是为了允许远程工作的开发人员在远程工作时通过中央存储库推送/拉取更改。
我有兴趣在我的 Ubuntu 系统中安装带有 Mercurial 的 etckeeper。我的原因是我不知道如何使用Git,暂时不想学习。如果我检查包描述,听起来很有希望:
kent@rat:~$ apt-cache search etckeeper
etckeeper - store /etc in git, mercurial, or bzr
Run Code Online (Sandbox Code Playgroud)
我想知道如何从这里继续?我试过谷歌搜索,但我没有找到任何适用于 Ubuntu + etckeeper + Mercurial 组合的东西。
(如果您知道针对这种情况的好教程,那么链接是一个很好的答案。无需重复。)
我已经使用 Puttygen 创建了一个公钥和一个私钥,现在我准备好让 Windows 7 上的 TortoiseHg 通过转到
ssh://somebody@code.somewhere.com/somecode
Run Code Online (Sandbox Code Playgroud)
但是似乎没有在哪里可以将私钥添加到 TortoiseHg?(甚至只是 Mercurial 命令行)
该文件已经在硬盘上的某个位置为somefile.ppk
. 有人知道怎么添加吗?
关于保护源代码访问的行业最佳实践是什么?我认为 SSL 只允许通过 apache 的连接通过一个不与其他任何东西冲突的模糊端口连接到我们的服务器。困扰我的是将源代码存储在面向公众的服务器上,即不仅可以通过 LAN 访问。此外,该服务器有多种用途。Apache 已经在为其他一些公司内部网站提供服务。我希望每个人都能够从任何地方(家中、机场等)访问源代码,只要他们拥有正确的凭据。建议?
mercurial ×10
apache-2.2 ×1
corruption ×1
crucible ×1
encoding ×1
etckeeper ×1
httpd ×1
ldap ×1
permissions ×1
public-key ×1
putty ×1
security ×1
source ×1
ssh ×1
svn ×1
tortoisehg ×1
ubuntu ×1
windows ×1