Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/361.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python windows server 2008/IIS 7上Mercurial 1.9.2的HTTPS提供错误号10054_Python_Iis 7_Mercurial_Https_Tortoisehg - Fatal编程技术网

Python windows server 2008/IIS 7上Mercurial 1.9.2的HTTPS提供错误号10054

Python windows server 2008/IIS 7上Mercurial 1.9.2的HTTPS提供错误号10054,python,iis-7,mercurial,https,tortoisehg,Python,Iis 7,Mercurial,Https,Tortoisehg,我们是一家小公司(它是一家微软商店),目前正在使用subversion并安装了VisualSVN(顺便说一句,安装起来非常简单) 我目前正在评估Mercurial,因为它在svn中有分支 所以我先跟着 使用最新的mercurial源代码1.9.2和Python2.7,出现以下错误 Failed to import callback module 'hgwebdir_wsgi' The specified module could not be found. 所以我划破了,然后我就这样做了 它一

我们是一家小公司(它是一家微软商店),目前正在使用subversion并安装了VisualSVN(顺便说一句,安装起来非常简单) 我目前正在评估Mercurial,因为它在svn中有分支

所以我先跟着 使用最新的mercurial源代码1.9.2和Python2.7,出现以下错误

Failed to import callback module 'hgwebdir_wsgi'
The specified module could not be found.
所以我划破了,然后我就这样做了 它一直工作到我到达台阶 启用SSL这就是问题所在。我甚至使用OpenSSL设置ssl证书 还是没什么。 这就是我得到的错误

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 =
 <?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 &quot;%s&quot;" 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>
web.config

[collections]
C:\repository\hg = C:/repository/hg

[web]
#push_ssl = false
allow_push = *
baseurl = /hg
cacerts =
 <?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 &quot;%s&quot;" 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>
编辑 我试图在我的macbook上安装MacHg进行测试。我用它作为演练,它很有效!!因此,这消除了服务器(即,服务器可以从http和https中推拉),所以现在我确定是我的windows/TortoiseHg出现了问题。(但对乌龟来说,按照这些步骤做什么都不会给我:()

EDIT2 还有一个发现…我甚至无法使用https进行克隆,它只适用于http。我尝试使用https克隆一个codeplex项目,结果成功了!…这真是令人沮丧


我是否遗漏了什么?如果有任何帮助,我们将不胜感激。

中介绍了如何使用Mercurial设置证书

在这一页上,有一条注释说“使用openssl而不是IIS来生成证书”——显然IIS7自签名证书在Mercurial使用的SSL库中无法验证

如果您安装了OrtoiseHG,您的Mercurial证书将从hgrc.d/cacert.pm读取。这意味着您必须在此处添加自签名证书


否则,获取安装故障排除帮助的最有效方法是通过

当我使用较旧的版本,即Mercurial 1.8.4时,它起了作用。因此我停止了进一步的调查

请确保进入IIS SSL设置并选中“忽略”在客户端证书上。

我只是为从搜索中进入线程的其他人发布此消息

当前,通过IIS托管mercurial python模块时,使用largefiles扩展名时出现问题。请查看您是否遇到通过TortoiseHg将大型更改集(或大型文件)推送到IIS的问题


问题最终被证明是Python 2.7.3引入的SSL处理中的一个错误(可能解释了为什么有那么多人在寻找Mercurial问题的未解决帖子)。回到Python 2.7.2让我更进一步(以30Mb的推送而不是15Mb的推送阻止),但为了正确解决这个问题,我必须安装该实用程序以完全禁用SSLv2上的传输。

我写了一些。我们在Mercurial 2.6上,它可以正常工作。

尝试将https URL与任何浏览器连接,并在此处显示IIS的答案(或浏览)它打开带有证书错误的默认存储库页面哪个证书错误???如果它是由于自签名证书而不受信任的根-将其添加到trustedRoot(如果没有人建议更好的解决方案)无法检查服务器证书。与服务器URL不匹配。但对我的svn服务器也是如此,并且它可以正常工作。您应该写入Mercurial邮件列表。他们可能会提供最好的帮助。