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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:25:38+00:00 2026-06-02T01:25:38+00:00

I have a centos server with code maintained using a mercurial repo. To allow

  • 0

I have a centos server with code maintained using a mercurial repo.
To allow a new person to commit code to mercurial, I create a new user, add them to the webdev group, and they can push / pull code by

hg pull ssh://name@server.com. 

However, there are some files (config files) that I would not like new users to have access to. Mercurial has been asked not to track these files, so the only way to access them is to ssh into the system and look at the files. Which I dont want new users to be able to do.

In essence, I want my new developers to only pull/push files through hg and disallow ssh-ing directly into the system. What the best way to do this? Can I provide hg access to a repo without providing ssh access to the files?

(or is my approach to the problem flawed?)

Thanks!

  • 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-02T01:25:40+00:00Added an answer on June 2, 2026 at 1:25 am

    This can be really easily done by taking advantage of the command option available in .ssh\authorized_keys files. When you’re granting their key access in that file you can prepend a “command=….” argument to their key and that’s the only command they can run.

    Mercurial ships with a handy script for doing exactly that. It has instructions inside:

    https://www.mercurial-scm.org/repo/hg/file/tip/contrib/hg-ssh

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

Sidebar

Related Questions

I am using centos Server and have to send the mail to the user
I have two servers: Fedora running Apache/2.2.14 (old server) CentOs running Apache/2.2.3 (new server)
We have a CentOS server with 2 ethernet adapters. Both of these adapters have
I am trying to install pdo_mysql on my CentOS server. I have PDO installed
I have Flash Media Server installed on my Centos OS. Everything is working well
I have a web site hosted in a CentOS 5-Plesk-Apache server. I have recently
I have installed and enabled SSH2 in my CentOS WHM/CPanel server, here is from
Using Whenever 0.7.3, Rails 3.2.2, Ruby 1.9.3, Passenger 3.0.11 on a CentOS 5.6 server
I have ImageMagick installed on my CentOS linux server. I am trying to get
I have server (centOS 5.5) and WHM installed. I installed manually Ruby 1.9.2, Rails

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.