[issue1262] More info needed to correct .htaccess/.htpasswd setup

Patrick Waugh mercurial-bugs at selenic.com
Sat Aug 16 10:43:59 CDT 2008


New submission from Patrick Waugh <ptwaugh at gmail.com>:

After three days of messing with it, I've come to the conclusion that I must 
be missing something to fundemental to be in the directions on the web, or 
something is broken.

When I do this:

                                                    
C:\Documents and Settings\Patrick\workspaces\cbl-dev
> hg push http://berrysoft.net/hg/cbl-dev           
pushing to http://berrysoft.net/hg/cbl-dev          
searching for changes                               
abort: authorization failed                         

as you can see I get: abort: authorization failed, however I believe I have 
stuff setup correctly.  I generate an .htpasswd file (named passwd) that looks 
like this: patrick:PxWFy3k7QkA6A using the link that my web host provides, and 
place that file in /home/berrysof/.htpasswds

My repositories are here:

/home/berrysof/public_html/hg/repos/cbl-dev, with the hgwebdir.cgi (renamed to 
hgweb.cgi), in hg with this .htaccess file:

Options +ExecCGI
RewriteEngine On

# Write base depending on where the base url lives
#
RewriteBase /hg
RewriteRule ^$ hgweb.cgi  [L]

# Send requests for files that exist to those files.
RewriteCond %{REQUEST_FILENAME} !-f

# Send requests for directories that exist to those directories.
RewriteCond %{REQUEST_FILENAME} !-d

# Send requests to hgweb.cgi, appending the rest of url.
RewriteRule (.*) hgweb.cgi/$1  [QSA,L]

AuthType Basic
AuthGroupFile /dev/null
AuthName "Hg Repository"
AuthUserFile "/home/berrysof/.htpasswds/passwd"
<LimitExcept GET>Require valid-user</LimitExcept>

And this hgweb.config:

# hgweb.config
#
# [paths]
# virtual/path = /real/path

[collections]
/home/berrysof/public_html/hg/repos = /home/berrysof/public_html/hg/repos

[web]
style=gitweb
baseurl=/hg

Is the problem something in my setup above???  Is the problem maybe hg is not 
installed correctly on the server??

Maybe my problem will bring to light something else that can be added to the 
docs.

Patrick

----------
messages: 6785
nosy: pwaugh
priority: wish
status: unread
title: More info needed to correct .htaccess/.htpasswd setup

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1262>
____________________________________________________



More information about the Mercurial-devel mailing list