Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6728091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:07:40+00:00 2026-05-26T10:07:40+00:00

I’m trying to get Mercurial to serve using hgwebdir.cgi under Apache on Mac OS

  • 0

I’m trying to get Mercurial to serve using hgwebdir.cgi under Apache on Mac OS X Lion.

I followed the directions listed here:
http://www.popitandrockit.com/2010/05/mercurial-server-on-osx-106-snow.html

That article is for Snow Leopard (I guess no one’s tried to do this on Lion yet?) but it mostly works. I did make the modification that I did not use https because the machine in question is behind my company’s firewall.

It says that I should be able to access a repository at http://servername/repository_name but that doesn’t work. I can, however, get a listing of them at http://servername/hg/, where /hg is the ScriptAlias address. So I should be able to get to a repository via http://servername/hg/repository_name, but instead I’m getting a nice Mercurial page telling me

An error has occured while processing your request:

repository /Users/username/Documents/repository_name not found

Well, the directory is valid and there is a valid repository there according to Mercurial (i.e., hg log and similar commands don’t error out)

On the main page I’m getting similar errors in Apache:

[(date)] [error] [client (ip address)] error accessing repository at /Users/username/Documents/repository_name

Were I to guess I’d say it was some sort of access or permissions issue but I’m not familiar enough with Apache or Mac OS X Lion to venture a guess as to how to fix it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:07:41+00:00Added an answer on May 26, 2026 at 10:07 am

    This indeed looks like a permissions problem. On a standard Mac OS X Apache install the web user and group are _www, and you need to make sure these have read and write access. Also Mercurial complains if the hgrc file’s permissions do not match the user. There are two ways to fix it:

    1. Make the repository owned by the Apache _www user. When you type:

      ls -ld /Users/username/Documents/repository_name
      

      It should show _www _www in the third and fourth column. If not, change the user of the directory:

      sudo chown -R _www:_www /Users/username/Documents/repository_name
      

      Note that if you change this, you should not access the repository on the file system from any other user, or else any newly created files will again have the wrong permissions.

    2. Alternatively, explicitly add your user to the trusted section in your hgweb.config:

      [trusted]
      users=username
      

      In this case you still need to make sure that the _www user has access at all. If you type:

      ls -ld /Users/username/Documents/repository_name
      

      It should show something like drwxrwxr-- in the first column (the middle rw are important) and _www in the fourth. If the files are not readable or writable by the group, use the chmod command to make them:

      chmod -R go+rwX /Users/username/Documents/repository_name
      

      And you can change the group of your repository to _www like so:

      sudo chown -R :_www /Users/username/Documents/repository_name
      

    Which of the two is preferable depends on your situation: if you’re trying to host your repository on a server I would say the first is preferable, it is simpler and a little more secure. If you’re trying to host it on your local workstation for convenience, the second is easier, because then you can still access the repository from your current user.

    Note that for ad-hoc sharing it may be easier to just run hg serve on the command line.

    I hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.