[ANNOUNCE] gitolite now has github-like "forking"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]