最新世界史书:access Mercurial over ssh tunnel (相忘于江湖)

来源:百度文库 编辑:偶看新闻 时间:2024/05/02 13:29:29

access Mercurial over ssh tunnel

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:

  1. $ ssh-keygen -b 1024 -t dsa
    [ create id_dsa.pub for server side ]
  2. $ cat < $HOME/.hgrc
    [ui]
    username = User Name

 
Server side:

  1. $ cat < $HOME/.ssh/authorized_keys

    command="cd /workspace/scm/hg/hgroot; /usr/demo/mercurial/hg-ssh g11n",\\ no-port-forwarding,no-X11-forwarding,no-agent-forwardingssh-[type] [key] 

    EOF

 

Client side:

  1. $ hg clone ssh://agc163.prc.sun.com/g11n
  2. [play with it]
  3. $ hg ci
  4. $ hg push