Skip to content

a modified wrapper for ssh access to a limited set of mercurial repositories

Notifications You must be signed in to change notification settings

stattrak-dragonlore/hgssh2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

hgssh2

A python script to control ssh access to mercurial repositories.

modified from hg-ssh (http://www.selenic.com/repo/hg-stable/raw-file/tip/contrib/hg-ssh)

See http://mercurial.selenic.com/wiki/SharedSSH for more information.

How to

copy hgssh2.py to your $PATH (e.g./usr/local/bin).

Create a new user hg with home directory /home/hg, all your repositories will go here.

Create a config file at /home/hg/hgssh2.conf:

[YOURNAME]

repo2 = read     
repo3 = write    

Add a new entry to /home/hg/.ssh/authorized_keys

command="hgssh2.py YOURNAME hgssh2.conf" ssh-rsa your_ssh_rsa_public_key

Create the repositories:

cd /home/hg/ && hg init repo2 && hg init repo3

Now you can access (only) these two repositories using your ssh key:

ssh://hg@example.com/repo2  (readonly to you)
ssh://hg@example.com/repo3

About

a modified wrapper for ssh access to a limited set of mercurial repositories

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages