doc/manual.docbook
changeset 142 fb64f9ac44c5
parent 141 e326e29b48ab
child 143 afb1d57ca9f7
equal deleted inserted replaced
141:e326e29b48ab 142:fb64f9ac44c5
    47 class="systemname">repository-host</systemitem>. We assume that you have created your SSH public key, set up your SSH agent with this key, and that this key gives you access to <systemitem
    47 class="systemname">repository-host</systemitem>. We assume that you have created your SSH public key, set up your SSH agent with this key, and that this key gives you access to <systemitem
    48 class="systemname">repository-host</systemitem>.  
    48 class="systemname">repository-host</systemitem>.  
    49 </para>
    49 </para>
    50 <para>First install mercurial-server on <systemitem
    50 <para>First install mercurial-server on <systemitem
    51 class="systemname">repository-host</systemitem>:</para>
    51 class="systemname">repository-host</systemitem>:</para>
    52 <screen>
    52 <screen><computeroutput>jay@my-workstation:~$ </computeroutput><userinput>scp mercurial-server_0.6.1_amd64.deb repository-host:</userinput>
    53 <computeroutput>jay@my-workstation:~$ </computeroutput><userinput>scp mercurial-server_0.6.1_amd64.deb repository-host:</userinput>
       
    54 <computeroutput>mercurial-server_0.6.1_amd64.deb 100%
    53 <computeroutput>mercurial-server_0.6.1_amd64.deb 100%
    55 jay@my-workstation:~$ </computeroutput><userinput>ssh -A repository-host</userinput>
    54 jay@my-workstation:~$ </computeroutput><userinput>ssh -A repository-host</userinput>
    56 <computeroutput>jay@repository-host:~$ </computeroutput><userinput>sudo dpkg -i mercurial-server_0.6.1_amd64.deb</userinput>
    55 <computeroutput>jay@repository-host:~$ </computeroutput><userinput>sudo dpkg -i mercurial-server_0.6.1_amd64.deb</userinput>
    57 <computeroutput>[sudo] password for jay: 
    56 <computeroutput>[sudo] password for jay: 
    58 Selecting previously deselected package mercurial-server.
    57 Selecting previously deselected package mercurial-server.
    61 Setting up mercurial-server (0.6.1) ...
    60 Setting up mercurial-server (0.6.1) ...
    62 jay@repository-host:~$ </computeroutput></screen>
    61 jay@repository-host:~$ </computeroutput></screen>
    63 <para>
    62 <para>
    64 mercurial-server is now installed on the repository host.  Next, we need to give you permission to access its repositories.
    63 mercurial-server is now installed on the repository host.  Next, we need to give you permission to access its repositories.
    65 </para>
    64 </para>
    66 <screen>
    65 <screen><computeroutput>jay@repository-host:~$ </computeroutput><userinput>ssh-add -L > my-key</userinput>
    67 <computeroutput>jay@repository-host:~$ </computeroutput><userinput>ssh-add -L > my-key</userinput>
       
    68 <computeroutput>jay@repository-host:~$ </computeroutput><userinput>sudo mkdir -p /etc/mercurial-server/keys/root/jay</userinput>
    66 <computeroutput>jay@repository-host:~$ </computeroutput><userinput>sudo mkdir -p /etc/mercurial-server/keys/root/jay</userinput>
    69 <computeroutput>jay@repository-host:~$ </computeroutput><userinput>sudo cp my-key /etc/mercurial-server/keys/root/jay/my-workstation</userinput>
    67 <computeroutput>jay@repository-host:~$ </computeroutput><userinput>sudo cp my-key /etc/mercurial-server/keys/root/jay/my-workstation</userinput>
    70 <computeroutput>jay@repository-host:~$ </computeroutput><userinput>sudo -u hg /usr/share/mercurial-server/refresh-auth</userinput>
    68 <computeroutput>jay@repository-host:~$ </computeroutput><userinput>sudo -u hg /usr/share/mercurial-server/refresh-auth</userinput>
    71 <computeroutput>jay@repository-host:~$ </computeroutput><userinput>exit</userinput>
    69 <computeroutput>jay@repository-host:~$ </computeroutput><userinput>exit</userinput>
    72 <computeroutput>Connection to repository-host closed.
    70 <computeroutput>Connection to repository-host closed.
    79 <section>
    77 <section>
    80 <title>Creating repositories</title>
    78 <title>Creating repositories</title>
    81 <para>
    79 <para>
    82 To store a repository on the server, clone it over.
    80 To store a repository on the server, clone it over.
    83 </para>
    81 </para>
    84 <screen>
    82 <screen><computeroutput>jay@my-workstation:~$ </computeroutput><userinput>cd my-mercurial-project</userinput>
    85 <computeroutput>jay@my-workstation:~$ </computeroutput><userinput>cd my-mercurial-project</userinput>
       
    86 <computeroutput>jay@my-workstation:~/my-mercurial-project$ </computeroutput><userinput>hg clone . ssh://hg@repository-host/repository/name</userinput>
    83 <computeroutput>jay@my-workstation:~/my-mercurial-project$ </computeroutput><userinput>hg clone . ssh://hg@repository-host/repository/name</userinput>
    87 <computeroutput>searching for changes
    84 <computeroutput>searching for changes
    88 remote: adding changesets
    85 remote: adding changesets
    89 remote: adding manifests
    86 remote: adding manifests
    90 remote: adding file changes
    87 remote: adding file changes
   102 As things stand, no-one but you has any access to any repositories you
    99 As things stand, no-one but you has any access to any repositories you
   103 create on this system. In order to give anyone else access, you'll need a
   100 create on this system. In order to give anyone else access, you'll need a
   104 copy of their SSH public key; we'll assume you have that key in
   101 copy of their SSH public key; we'll assume you have that key in
   105 <filename>~/sam-key.pub</filename>.  To manage access, you make changes to the special <literal>hgadmin</literal> repository.
   102 <filename>~/sam-key.pub</filename>.  To manage access, you make changes to the special <literal>hgadmin</literal> repository.
   106 </para>
   103 </para>
   107 <screen>
   104 <screen><computeroutput>jay@my-workstation:~$ </computeroutput><userinput>hg clone ssh://hg@repository-host/hgadmin</userinput>
   108 <computeroutput>jay@my-workstation:~$ </computeroutput><userinput>hg clone ssh://hg@repository-host/hgadmin</userinput>
       
   109 <computeroutput>destination directory: hgadmin
   105 <computeroutput>destination directory: hgadmin
   110 no changes found
   106 no changes found
   111 updating working directory
   107 updating working directory
   112 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   108 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   113 jay@my-workstation:~$ </computeroutput><userinput>cd hgadmin</userinput>
   109 jay@my-workstation:~$ </computeroutput><userinput>cd hgadmin</userinput>