{"thread":{"id":"23593","subject":"[ANNOUNCE] gitolite now has github-like \"forking\"","startedAt":"2010-04-25T09:33:10Z","lastAt":"2010-04-25T09:33:10Z","messageCount":1,"participants":["Sitaram Chamarty"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"140332","messageId":"h2x2e24e5b91004250233i22d4b66ew5efabb6ef6492e74@mail.gmail.com","threadId":"23593","inReplyTo":null,"subject":"[ANNOUNCE] gitolite now has github-like \"forking\"","fromName":"Sitaram Chamarty","fromEmail":"sitaramc@gmail.com","sentAt":"2010-04-25T09:33:10Z","receivedAt":"2010-04-25T09:33:10Z","isPatch":false,"sender":{"key":"sitaramc@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43316?v=4"},"body":"Hello,\n\n[I'm sending this to the larger git community because I'd like to hear\nfrom people interested in this sort of functionality and willing to help\nme test it].\n\nGitolite's current \"pu\" branch has acquired some features by which it\ncan now be used to do things like the \"fork\" operation of github (and\npresumably other similar services).  Gitolite will never be web-based,\nor GUI, etc., so it's not even remotely in the same class as github but\nfor some urgent, simple, needs this can be used to emulate forking\nrepositories a la github.\n\nWhat follows is a very short howto, for the curious.  It assumes some\nknowledge of basic gitolite usage only because I didn't want to make\nthis too lengthy; feel free to ask if needed.\n\nAdmin tasks (one time):\n\n  * use the \"pu\" branch; the current tip is the commit called \"(adc)\n    documentation\".  \"adc\" stands for \"admin-defined commands\"\n\n  * install it, then edit `~/.gitolite.rc` on the server to\n    uncomment/update the following lines as shown (or similar):\n\n        $GL_WILDREPOS = 1;\n        $GL_ADC_PATH = \"/home/git/adc\"; # or any convenient directory\n\n  * copy the files from contrib/adc in the gitolite source to the above\n    path on the server.\n\n  * add the following lines to the default gitolite.conf that the\n    install gives you:\n\n        repo CREATER/.+\n            C       =   @all\n            RW+     =   CREATER\n            RW      =   WRITERS\n            R       =   @all\n\n    All repos created now are public-readable by default.  Replace the\n    \"@all\" in the last line with \"READERS\" if you want the repos to be\n    private by default.\n\nUser tasks:\n\nThis is how users would use it, once their pubkeys have been added to\nthe keydir/ and pushed as usual.  We assume this is being done from\nuser \"alice\"'s account.\n\nCreating a new repo on the server:\n\n    git clone git@server:alice/foo\n        # create and clone an empty repo to start working\n    git push [--all] git@server:alice/foo [refspec]\n        # or, create and push from an existing repo in one shot\n\nRemoving an existing repo that you no longer need (be careful!):\n\n    ssh git@server rmrepo alice/foo\n\nListing all repos you have access to (will show yours as well as others'\nrepos that you have been given access to):\n\n    ssh git@server expand [optional-pattern]\n\nForking user \"bob\"'s \"bar\" repo (assuming you have at least read access):\n\n    ssh git@server fork bob/bar alice/bar\n\nSetting permissions for a repo you own:\n\n    ssh git@server setperms alice/bar\n    RW bob\n    R eve mallory\n    <ctrl-d>\n\nGetting permissions for a repo you own:\n\n    ssh git@server getperms alice/bar\n    # prints:\n    RW bob\n    R eve mallory\n\nI'm rather pleased that, after a refactoring of the \"query rights\" code\nthat was useful by itself anyway, this feature only added about 25 lines\nto the core code.  Many thanks to Eli for sparking this whole thing off.\n\nIf anyone else wants to help me test it, I'd very grateful.  Details at\nhttp://github.com/sitaramc/gitolite/blob/pu/doc/admin-defined-commands.mkd\n\n-- \nSitaram\n"}]}