doc/manual.docbook
changeset 123 20b54500a618
parent 122 05b676684c7e
child 124 6836769f5134
equal deleted inserted replaced
122:05b676684c7e 123:20b54500a618
   147 <title>Adding other users</title>
   147 <title>Adding other users</title>
   148 <para>
   148 <para>
   149 As things stand, no-one but you has any access to any repositories you
   149 As things stand, no-one but you has any access to any repositories you
   150 create on this system. In order to give anyone else access, you'll need a
   150 create on this system. In order to give anyone else access, you'll need a
   151 copy of their SSH public key; we'll assume you have that key in
   151 copy of their SSH public key; we'll assume you have that key in
   152 <filename>~/other-users-key.pub</filename>. You could give them access by
   152 <filename>~/sam-key.pub</filename>. You could give them access by
   153 logging into <systemitem class="systemname">repository-host</systemitem>,
   153 logging into <systemitem class="systemname">repository-host</systemitem>,
   154 putting the key in the right place under <filename
   154 putting the key in the right place under <filename
   155 class='directory'>/etc/mercurial-server/keys</filename>, and re-running
   155 class='directory'>/etc/mercurial-server/keys</filename>, and re-running
   156 <userinput>sudo -u hg /usr/share/mercurial-server/refresh-auth</userinput>.
   156 <userinput>sudo -u hg /usr/share/mercurial-server/refresh-auth</userinput>.
   157 However, there's a more convenient way.
   157 However, there's a more convenient way.
   162 <computeroutput>destination directory: hgadmin
   162 <computeroutput>destination directory: hgadmin
   163 no changes found
   163 no changes found
   164 updating working directory
   164 updating working directory
   165 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   165 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   166 jay@my-workstation:~$ </computeroutput><userinput>cd hgadmin</userinput>
   166 jay@my-workstation:~$ </computeroutput><userinput>cd hgadmin</userinput>
   167 <computeroutput>jay@my-workstation:~/hgadmin$ </computeroutput><userinput>mkdir -p keys/users/pat</userinput>
   167 <computeroutput>jay@my-workstation:~/hgadmin$ </computeroutput><userinput>mkdir -p keys/users/sam</userinput>
   168 <computeroutput>jay@my-workstation:~/hgadmin$ </computeroutput><userinput>cp ~/other-users-key.pub keys/users/pat/their-workstation</userinput>
   168 <computeroutput>jay@my-workstation:~/hgadmin$ </computeroutput><userinput>cp ~/other-users-key.pub keys/users/sam/their-workstation</userinput>
   169 <computeroutput>jay@my-workstation:~/hgadmin$ </computeroutput><userinput>hg add</userinput>
   169 <computeroutput>jay@my-workstation:~/hgadmin$ </computeroutput><userinput>hg add</userinput>
   170 <computeroutput>adding keys/users/pat/their-workstation
   170 <computeroutput>adding keys/users/sam/their-workstation
   171 jay@my-workstation:~/hgadmin$ </computeroutput><userinput>hg commit -m "Add other jay"</userinput>
   171 jay@my-workstation:~/hgadmin$ </computeroutput><userinput>hg commit -m "Add Sam's key'"</userinput>
   172 <computeroutput>jay@my-workstation:~/hgadmin$ </computeroutput><userinput>hg push</userinput>
   172 <computeroutput>jay@my-workstation:~/hgadmin$ </computeroutput><userinput>hg push</userinput>
   173 <computeroutput>pushing to ssh://hg@repository-host/hgadmin
   173 <computeroutput>pushing to ssh://hg@repository-host/hgadmin
   174 searching for changes
   174 searching for changes
   175 remote: adding changesets
   175 remote: adding changesets
   176 remote: adding manifests
   176 remote: adding manifests
   177 remote: adding file changes
   177 remote: adding file changes
   178 remote: added 1 changesets with 1 changes to 1 files
   178 remote: added 1 changesets with 1 changes to 1 files
   179 jay@my-workstation:~/hgadmin$ </computeroutput></screen>
   179 jay@my-workstation:~/hgadmin$ </computeroutput></screen>
   180 <para>
   180 <para>
   181 The new user can now read and write to your
   181 Sam can now read and write to your
   182 <literal>ssh://hg@repository-host/repository/name</literal> repository.
   182 <literal>ssh://hg@repository-host/repository/name</literal> repository.
   183 Most other changes to access control can be made simply by making and
   183 Most other changes to access control can be made simply by making and
   184 pushing changes to <literal>hgadmin</literal>, and you can use Mercurial to
   184 pushing changes to <literal>hgadmin</literal>, and you can use Mercurial to
   185 cooperate with other root users in the normal way.
   185 cooperate with other root users in the normal way.
   186 </para>
   186 </para>