clone from URL

norricorp john at norricorp.f9.co.uk
Wed Jun 15 02:36:48 CDT 2011


When I connect via a browser, I get the following in the apache access_log.
(i have removed dates to make it shorter)
"GET /hg/p1 HTTP/1.1" 401 470 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64;
rv:2.0.1) Gecko/20100101 Firefox/4.0.1"
"GET /hg/p1 HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64;
rv:2.0.1) Gecko/20100101 Firefox/4.0.1"
"GET /hg/static/style-paper.css HTTP/1.1" 304 - "http://jazz/hg/p1"
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1"
"GET /hg/static/hglogo.png HTTP/1.1" 304 - "http://jazz/hg/p1" "Mozilla/5.0
(Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1"

Nothing in the error log.

When I run a clone from the command line of a PC
C:\mercurial>hg clone http://jazz/hg/p1 p1_clone
http authorization required
realm: Mercurial repositories
user: jnorris
password:
abort: HTTP Error 404: Not Found

Nothing in the access_log or error_log of apache. Which is different to
yesterday but I have rebooted since then.

Here are the changes made to the httpd.conf
ScriptAlias /hg "/var/www/cgi-bin/hgweb.cgi"

<Location /hg>
    AuthType Basic
    AuthName "Mercurial repositories"
    AuthUserFile /merc_repos/hgusers
    Require valid-user
</Location>

here is the hgrc file in the .hg dir of the repsoitory
[web]
allow_push = jnorris, vobadm

Here is the hgweb.cgi file
# Path to repo or hgweb config to serve (see 'hg help hgweb')
config = "/merc_repos/project1"

# Uncomment and adjust if Mercurial is not installed system-wide:
import sys; sys.path.insert(0, "/usr/local/lib/python2.4/site-packages")

# Uncomment to send python tracebacks to the browser if an error occurs:
import cgitb; cgitb.enable()

from mercurial import demandimport; demandimport.enable()
from mercurial.hgweb import hgweb, wsgicgi
application = hgweb(config)
wsgicgi.launch(application)

and the hgweb.config file
[paths]
p1 = /merc_repos/project1

I have made the repository writable by anyone (though in real life should be
owned by apache rather than me I guess).

If I run hg clone http://jazz/hg/p2 p1_clone (and p2 does not exist) the I
get the same ie authentication request and finally 404 error. The 404 error
is sensible. And I guess the authentication is because it is running
hgweb.cgi.

So I am not sure is providing the 404 error. Apache can find the files when
requested from a browser but can not find the files when the request comes
from hg clone.

John

--
View this message in context: http://mercurial.808500.n3.nabble.com/clone-from-URL-tp3062772p3066353.html
Sent from the General mailing list archive at Nabble.com.


More information about the Mercurial mailing list