【发布时间】:2011-11-30 20:09:03
【问题描述】:
我们是一家小公司(它是一家微软商店),我们目前正在使用安装了 VisualSVN 的 subversion(顺便说一句,很容易设置) 由于 svn 中的分支噩梦,我目前正在评估 Mercurial。
所以我先跟着 http://www.firegarden.com/software/hosting-mercurial-repo-iis7-windows-server-2008r2-x64-python-isapi-cgi 使用最新的 mercurial 源代码 1.9.2 和 python 2.7 得到以下错误
Failed to import callback module 'hgwebdir_wsgi'
The specified module could not be found.
所以我抓了那个然后我跟着这个 http://www.jeremyskinner.co.uk/mercurial-on-iis7/ 它一直有效,直到我到达步骤 启用 SSL 这就是问题所在。我什至使用 OpenSSL 设置 ssl 证书 http://www.dylanbeattie.net/docs/openssl_iis_ssl_howto.html 依然没有。 这是我得到的错误
URLError: [Errno 10054] An existing connection was forcibly closed by the remote host
[command returned code 255...]
服务器端我有这个 hgweb.config
[collections]
C:\repository\hg = C:/repository/hg
[web]
#push_ssl = false
allow_push = *
baseurl = /hg
cacerts =
web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="Python" path="*.cgi" verb="*" modules="CgiModule" scriptProcessor="C:\Python27\python.exe -u "%s"" resourceType="Unspecified" />
</handlers>
<rewrite>
<rules>
<rule name="rewrite to hgweb" patternSyntax="Wildcard">
<match url="*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="hgweb.cgi/{R:1}" />
</rule>
</rules>
</rewrite>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength ="2147482624" />
</requestFiltering>
</security>
</system.webServer>
<system.web>
<httpRuntime executionTimeout="540000" maxRequestLength="2097151"/>
</system.web>
客户端 hgrc
[paths]
default = https://webtest/hg/test/
[hostfingerprints]
webtest = 50:de:a4:d9:72:59:68:fd:91 ...
编辑 我试图在我的 macbook 上安装 MacHg 进行测试。我使用http://machghelp.jasonfharris.com/kb/connections/how-do-i-add-a-server-certificate-or-fingerprint-for-https 作为演练,它有效!所以这消除了服务器(即服务器可以从 http 和 https 推送和拉取)所以现在我确定我的 windows/TortoiseHg 有问题。 (但是按照tortoiseHg的这些步骤没有给我任何东西:()
EDIT2 还有一个发现...我什至无法使用 https 进行克隆,它仅适用于 http。我尝试使用 https 克隆其中一个 codeplex 项目,并且有效!...这真的令人沮丧
我错过了什么吗?任何帮助将不胜感激。
【问题讨论】:
-
尝试使用任何浏览器连接 https URL - 并在此处显示 IIS 的答案(或了解它)
-
它会打开带有证书错误的默认存储库页面
-
哪个证书错误???如果由于自签名证书而成为不受信任的根 - 将其添加到trustedRoot(如果没有人建议更好的解决方案)
-
无法检查服务器证书。与服务器的 URL 不匹配。但我的 svn 服务器也一样,它可以正常工作
-
您应该写信给 Mercurial 邮件列表。他们可能会提供最好的帮助。
标签: python iis-7 mercurial https tortoisehg