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 9131531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:09:22+00:00 2026-06-17T08:09:22+00:00

OS: Linux OpenSUSE Version control – Mercurial Apache2 I run http ://my.os.name/ it gives

  • 0

OS: Linux OpenSUSE
Version control – Mercurial
Apache2

I run http ://my.os.name/ it gives me a page – thus apache is running.
I run http ://my.os.name:/hg – It shows me Mercurial page, thus mercurial is
showing up on http Internet Explorer page.

I’m able to create repositories/or do normal work in Mercurial.

What I need.
1. When I open the above Hg link
then, instead of showing me the Mercurial(Hg) repository page home page, it should first check whether I belong to my company or not i.e. it should authenticate using Windows Active Directory or LDAP server.

  1. If I’m making any changes to a file or create a directory / repository in Hg, then it should make sure / authenticate/verify whether I have valid access to do that operation or not.

HOW can I do this, I need step by step help as I’m new in Apache/Mercurial authentication setup.

I have almost read all the Online help in setting this up and so far I’m able to get to a point whether when I open Hg link, I get a popup for username/password prompt, but its not taking it / not working.

I also dont want to create .htpasswd/ .htaccess or digest files. What I’m wondering is that if in Windows Active Directory, if I have a Security group created for ex: Company/Project1_readers, Company/Project1_Contributors, Company/Project1_Repository1_Readers, Company/Project1_Repository2_Contributors… and in those AD security group ids, if I have all the developers added, then using these groups in AD, I want to grant access to developers instead of adding those users in .hg/hgrc file.
(This is what usually we do in TFS (Team foundation Server) to grant/revoke access) instead of messing with files (adding/removing users) in every repository etc.

How can I do the above?

Kindly advise if the best way is only creating .htpasswd/.htaccess/.htdigest etc files…if I’m wrong in achieving the above scenario.

My httpd.conf file Includes another .conf file (which contains)

=========================================

<Directory /srv/www/hg>
   Order deny,allow
   Deny from All
   AuthType Basic
#   #AuthName "Apache Web Site: Login with your AD(Active Directory) credentials"
   AuthName "Mercurial Repositories"
#
#
#   AuthBasicProvider ldap
#   AuthzLDAPAuthoritative off
#   #AuthLDAPURL ldap://10.211.16.1:389/OU=TSH,DC=tsh,DC=Mason,DC=com?sAMAccountName
#   AuthLDAPURL "ldap://10.211.16.1:389/?samAccountName?sub?(objectClass=user)"
##               #ldap://ldap.your-domain.com:389/o=stooges?uid?sub
#   AuthLDAPBindDN "cn=xyzserver,OU=Services,OU=Users,OU=Infrastructure,OU=DEN,OU=KSH,DC=Psh,DC=Mason,DC=com"
#                  #"cn=StoogeAdmin,o=stooges"
#   AuthLDAPBindPassword secret1
   require valid-user
#   require ldap-user
   Satisfy any
</Directory>

When I’m using the abvoe LDAP URL in Jenkins, Jenkins is successfully authenticating a user while logging in, then why the same is not working when it’s in this server’s .conf file. Note, in apache2, the above doesn’t have to be in httpd.conf file. Include concept is letting me include the file.conf and file.conf contains the above code. This is as per Apache2 directions as mentioned in httpd.conf file.

Rest of the mercurial files hgwebdir.cgi, hgweb.cgi, hgweb.config are all good (as per online blogs I have read).

I have all the required modules loaded (as they are visible in /etc/apache2/sysconfig.d/loadmodule.conf file (modules which are required for LDAP auth i.e. mod_ldap, mod_authz_ldap etc etc related to ldap and apache).

  • 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-06-17T08:09:23+00:00Added an answer on June 17, 2026 at 8:09 am

    if prompted multiple times for user credentials in mercurial. Setup Mercurial_Keyring and then

    this question comes which nobody explained in an easy way.

    ??? how to make the [auth] xx.prefix = servername/hg_or_something work for all repositories under servername/hg location either if I use servername, servername’s IP or servername’s FQDN ?

    ANSWER: Arun • 2 minutes ago
    −

    OK, I put this in ~/.hgrc (Linux/Unix -home directory's .hgrc hidden file) or Windows users %UserProfile%/mercurial.ini or %HOME%/mercurial.ini file.
    
    [auth]
    default1.schemes = http https
    default1.prefix = hg_merc_server/hg
    default1.username = c123456
    
    default2.schemes = http https
    default2.prefix = hg_merc_server.company.com/hg
    default2.username = c123456
    
    default3.schemes = http https
    default3.prefix = 10.211.222.321/hg
    default3.username = c123456
    
    Now, I can checkout using either Server/IP/Server's FQDN.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a shell script, which is run under a opensuse linux, that starts
On 64-bit openSUSE Linux, can a 32-bit eclipse running with 32-bit JVM compile code
On an OpenSuSE linux machine, I want to run a script when the machine
Since it's a Linux question, I'll note I'm using OpenSUSE 12.1 I'm running a
I run linux opensuse 11.4. I try to run this little programme on a
[first of all; i run linux opensuse 11.4 ] i try to run this
I want to restart apache from a bash in linux (OpenSUSE). I am trying
[root@LINUX misc]# pwd /usr/local/openssl/ssl/misc [root@LINUX misc]# ./tsget -h http://tsa.opentsa.org:8080/tsa ../../bin/alllog.log.tsq ../../bin/alllog.log.tsq: fatal error: could
I'm running mono 2.10.6 on openSUSE 12.1. Shouldn't there be a System.Data.dll in either
I've decided to bring up a GSM Modem for my Linux machine (OpenSuse 12.1

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.