access Mercurial over ssh tunnel
Monday Apr 09, 2007
Accessing Mercurial through http/apache is handy, but it requests the workspace is owned by the same user with httpd (webservd:webservd on solaris). So accessing Mercurial over ssh tunnel is a better choice (this is also the way http://www.opensolaris.org/ chose).
Client side:
- $
ssh-keygen -b 1024 -t dsa
[ create id_dsa.pub for server side ] $ cat <<EOF > $HOME/.hgrc
[ui]
username = User Name <user.name@example.com>
Server side:
- $ cat <<EOF > $HOME/.ssh/authorized_keys
command="cd /workspace/scm/hg/hgroot; /usr/demo/mercurial/hg-ssh g11n",\ no-port-forwarding,no-X11-forwarding,no-agent-forwarding ssh-[type] [key]
EOF
Client side:
- $ hg clone ssh://agc163.prc.sun.com/g11n
- [play with it]
- $ hg ci
- $ hg push











