git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sitaram Chamarty <sitaramc@gmail.com>
To: gitolite <gitolite@googlegroups.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: [ANNOUNCE] gitolite now has github-like "forking"
Date: Sun, 25 Apr 2010 15:03:10 +0530	[thread overview]
Message-ID: <h2x2e24e5b91004250233i22d4b66ew5efabb6ef6492e74@mail.gmail.com> (raw)

Hello,

[I'm sending this to the larger git community because I'd like to hear
from people interested in this sort of functionality and willing to help
me test it].

Gitolite's current "pu" branch has acquired some features by which it
can now be used to do things like the "fork" operation of github (and
presumably other similar services).  Gitolite will never be web-based,
or GUI, etc., so it's not even remotely in the same class as github but
for some urgent, simple, needs this can be used to emulate forking
repositories a la github.

What follows is a very short howto, for the curious.  It assumes some
knowledge of basic gitolite usage only because I didn't want to make
this too lengthy; feel free to ask if needed.

Admin tasks (one time):

  * use the "pu" branch; the current tip is the commit called "(adc)
    documentation".  "adc" stands for "admin-defined commands"

  * install it, then edit `~/.gitolite.rc` on the server to
    uncomment/update the following lines as shown (or similar):

        $GL_WILDREPOS = 1;
        $GL_ADC_PATH = "/home/git/adc"; # or any convenient directory

  * copy the files from contrib/adc in the gitolite source to the above
    path on the server.

  * add the following lines to the default gitolite.conf that the
    install gives you:

        repo CREATER/.+
            C       =   @all
            RW+     =   CREATER
            RW      =   WRITERS
            R       =   @all

    All repos created now are public-readable by default.  Replace the
    "@all" in the last line with "READERS" if you want the repos to be
    private by default.

User tasks:

This is how users would use it, once their pubkeys have been added to
the keydir/ and pushed as usual.  We assume this is being done from
user "alice"'s account.

Creating a new repo on the server:

    git clone git@server:alice/foo
        # create and clone an empty repo to start working
    git push [--all] git@server:alice/foo [refspec]
        # or, create and push from an existing repo in one shot

Removing an existing repo that you no longer need (be careful!):

    ssh git@server rmrepo alice/foo

Listing all repos you have access to (will show yours as well as others'
repos that you have been given access to):

    ssh git@server expand [optional-pattern]

Forking user "bob"'s "bar" repo (assuming you have at least read access):

    ssh git@server fork bob/bar alice/bar

Setting permissions for a repo you own:

    ssh git@server setperms alice/bar
    RW bob
    R eve mallory
    <ctrl-d>

Getting permissions for a repo you own:

    ssh git@server getperms alice/bar
    # prints:
    RW bob
    R eve mallory

I'm rather pleased that, after a refactoring of the "query rights" code
that was useful by itself anyway, this feature only added about 25 lines
to the core code.  Many thanks to Eli for sparking this whole thing off.

If anyone else wants to help me test it, I'd very grateful.  Details at
http://github.com/sitaramc/gitolite/blob/pu/doc/admin-defined-commands.mkd

-- 
Sitaram

                 reply	other threads:[~2010-04-25  9:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=h2x2e24e5b91004250233i22d4b66ew5efabb6ef6492e74@mail.gmail.com \
    --to=sitaramc@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitolite@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).