Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There is more than one possible way to do this.</p> <ul> <li><p>If your users each have a shell account (perhaps limited), and each of them accessing git repositories via their own account, you can use <strong>filesystem permissions</strong> to control SSH access to git repositories. On Unix those would be write permissions on <em>directories</em>, perhaps with the help of creating a group and specific permissions for a group (with "sticky group ID" set).</p></li> <li><p>Pushing requires <strong><code>git-receive-pack</code></strong> to be in $PATH of user, and be executable for them... although I am not sure how feasible this approach would be.</p></li> <li><p>You can use <strong><code>update</code> or <code>pre-receive</code> hook</strong> to do access control to repository, for example using <a href="http://git.kernel.org/?p=git/git.git;a=blob;f=contrib/hooks/update-paranoid;hb=HEAD" rel="noreferrer" title="git.kernel.org - git/git.git/blob - contrib/hooks/update-paranoid">update-paranoid</a> example hook from <code>contrib/hooks</code> in git sources.</p></li> <li><p>With larger number of users you could be better with using a <strong>tool to manage access to git repositories</strong>, like <a href="http://swik.net/gitosis" rel="noreferrer">Gitosis</a> (in Python, requires setuptools) or <a href="http://github.com/sitaramc/gitolite" rel="noreferrer">Gitolite</a> (in Perl).</p></li> <li><p>For read only access you can setup <strong><a href="http://www.kernel.org/pub/software/scm/git/docs/git-daemon.html" rel="noreferrer" title="git-daemon(1) Manual Page - A really simple server for git repositories">git daemon</a></strong> to provide read-only anonymous (and unauthenticated) access via <code>git://</code> protocol, instead of access via SSH protocol. </p> <p>See documentation for <code>url.&lt;base&gt;.insteadOf</code> config variable for a way to ease the transition from SSH to GIT protocol.</p></li> </ul> <hr> <p>See also Chapter 4. "<a href="http://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols" rel="noreferrer">Git on the Server</a>" of <a href="http://progit.org" rel="noreferrer">Pro Git</a> book by Scott Chacon (CC-BY-NC-SA licensed).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload