HTTPS for Mercurial 1.9.2 on a Windows 2008 / IIS 7 server gives me Errno 10054

We are a small company (its Microsoft store), in which we are currently using subversion with VisualSVN installed (btw is fairly easy to set up). Currently I am evaluating Mercurial due to a branching nightmare in svn.

So, first I followed http://www.firegarden.com/software/hosting-mercurial-repo-iis7-windows-server-2008r2-x64-python-isapi-cgi with the latest mercury source code 1.9.2, and python 2.7 got the following error

Failed to import callback module 'hgwebdir_wsgi' The specified module could not be found. 

so I scratched and then I followed this http://www.jeremyskinner.co.uk/mercurial-on-iis7/ and it worked until I reached the Enable SSL step, which is the problem. I even install ssl certificates using OpenSSL http://www.dylanbeattie.net/docs/openssl_iis_ssl_howto.html yet nothing. this is the error i get

 URLError: [Errno 10054] An existing connection was forcibly closed by the remote host [command returned code 255...] 

On the server side, I have this 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 &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> 

hgrc client side

 [paths] default = https://webtest/hg/test/ [hostfingerprints] webtest = 50:de:a4:d9:72:59:68:fd:91 ... 

EDIT I tried installing MacHg on my macbook for testing. I used http://machghelp.jasonfharris.com/kb/connections/how-do-i-add-a-server-certificate-or-fingerprint-for-https as a walkthrough, and it WORKS !! so this excludes the server (for example, the server can push and pull with both http and https), so now I'm sure its windows / TortoiseHg have problems. (but after these steps for tortoiseHg it gives me nothing :()

EDIT2 Another conclusion ... I can't even clone using https, it only works for http. I tried to clone one of the codeplex projects using https and it works! ... It really upsets

Am I missing something? Any help would be appreciated.

+2
source share
5 answers

It worked when I used the older version ie ie Mercurial 1.8.4. So I stopped investigating further

0
source

Configuring certificates using Mercurial is described at https://www.mercurial-scm.org/wiki/CACertificates

This page has this note that says: β€œUse openssl, not IIS, to create certificates” - apparently, self-signed IIS7 certificates are not checked in the SSL library used by Mercurial.

If you install TortoiseHg, your Mercurial certificates will be read from hgrc.d / cacert.pm. This means that you must add your self-signed certificate here.

Otherwise, the most effective way to get help with installation troubleshooting is Mercurial IRC.

+1
source

Make sure you are logged in to IIS SSL and select the ignore check box in client certificates.

0
source

I just post this to anyone who gets into the stream from the search.

There is currently a problem with the largefiles extension in the mercurial python module when hosting through IIS. See this post if you encounter issues that cause large changes (or large files) in IIS through TortoiseHg.

The problem ultimately turns out to be an error in the SSL processing introduced by Python 2.7.3 (perhaps explaining why there are so many unresolved messages from people looking for problems with Mercurial). Returning to Python 2.7.2, let me move forward a bit (blocked at 30 MB, pushing instead of 15 MB), but for the right decision I had to install IISCrypto to completely disable SSLv2 transmission.

0
source

I wrote some detailed instructions on how to use Mercurial in IIS . We are on Mercurial 2.6 and it works.

0
source

Source: https://habr.com/ru/post/1242288/


All Articles