"ssl required" while trying to push to https-repository

Daniel Cestari dcestari at gmail.com
Fri Apr 3 00:06:49 CDT 2009


When running mercurial's hgweb script as a FastCGI process, this problem 
appears, it is solved by adding a parameter called HTTPS with an "on" value.

An example of this on NGINX is:

server {
  listen 443;
  ...
  ...
  ...
  ssl stuff here
  ...
  ...
  fastcgi_pass socket:address;
  fastcgi_param NAME value;
  ...
  fastcgi_param HTTPS on;   #<-- IMPORTANT PART
  ...
}


Andreas Piening wrote:
> 
> Hi mercurial-list,
> 
> I use mercurial 1.0.1-r2 and want to share my repositories with  
> hgwebdir.cgi. I configured apache2 for ssl (https) and authentication  
> and to use the hgwebdir.cgi for directory-listing and I rewrite  
> anything to hgwebdir.cgi. ATM it looks like this:
> 
> <VirtualHost *:443>
>          ServerName hg.myrepository.de
>          DocumentRoot "/var/hg/hg.myrepository.de/"
> 
>          RewriteEngine On
>          RewriteRule ^/(.*) /hgwebdir.cgi/$1
> 
>          <Directory "/var/hg/hg.myrepository.de/">
>                  DirectoryIndex hgwebdir.cgi
>                  AddHandler cgi-script .cgi
>                  Options +ExecCGI +FollowSymLinks
>                  AllowOverride None
> 
>                  # Controls who can get stuff from this server.
>                  Order allow,deny
>                  Allow from all
> 
>                  AuthUserFile /var/hg/hg.myrepository.de/.htpasswd
>                  AuthName "My Mercurial Repositories"
>                  AuthType Basic
>                  Require valid-user
>          </Directory>
> 
>          <IfModule mpm_peruser_module>
>                  ServerEnvironment apache apache
>          </IfModule>
> </VirtualHost>
> 
> Since I want allways want use https for clone/pull AND push, I created  
> a http-vhost which just redirects to this https-one. But I use https  
> directly in my tests.
> 
> Everythin except pushing works out of the box:
> I can access the hgwebdir and it shows up my testrepository.
> The authentication works, and I can browse the repository and see  
> changes that I've made on my testrepository directly on the filesystem.
> I can clone the repository from https. The authentication comes up,  
> works like a charm.
> 
> But when I do any sort of push, like
> hg push https://hg.myrepository.de/testrepository/
> 
> I get this:
> pushing to https://hg.myrepository.de/testrepository/
> http authorization required
> realm: My Mercurial Repositories
> user: testuser
> password:
> searching for changes
> ssl required
> 
> Seems like the searching for changes works, but then this "ssl  
> required" message comes up.
> 
> Any help or hint would be appreciated.
> 
> Thank you in advance
> 
> Andreas Piening
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
> 
> 

-- 
View this message in context: http://www.nabble.com/%22ssl-required%22-while-trying-to-push-to-https-repository-tp19123064p22862037.html
Sent from the Mercurial mailing list archive at Nabble.com.



More information about the Mercurial mailing list