{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1743401518,
"reponame":"gitohashi",
"desc":"Git web frontend with clientside rendering",
"owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://warmcat.com/repo/gitohashi",
"f":3,
"items": [
{"schema":"libjg2-1",
"cid":"925f3b7d710846191a41ed934a7bec67",
"oid":{ "oid": "9961e6fef5f0f2458efc1c2a40d63f7cc50ebfce", "alias": [ "refs/heads/main","refs/heads/master"]},"blobname": "doc/README-gitolite.md", "blob": "### Notes on gitolite vs gitolite3\n\nGitohashi requires gitolite v3+.\n\nThe \u0022gitolite\u0022 package found in Fedora and older Ubuntu is actually gitolite\nv2, from many years ago. Fedora since F16 and Ubuntu since Xenial provide a\n\u0022gitolite3\u0022 package which is current gitolite.\n\nIf you're still on v2, you'll need to go through a [one-way upgrade process](http://gitolite.com/gitolite/migr/index.html#migrating-from-gitolite-v2).\n\nv2 and v3 broadly allows mostly the same config syntax, although there are\nsome removed v2 features in the .rc file and new v3 features, see [this](http://gitolite.com/gitolite/migr/index.html#step-4-identify-any-remaining-changes-needed)\n\nAdditionally:\n\n - anglebrackets and parenthesis are disallowed in config strings in v3.\n This disallows the common email format \u0022Name \u003cname@email.com\u003e\u0022... gitohashi\n understands \u0022Name name@email.com\u0022 as well in order to get around this.\n\n### Selecting which repos to show on a vhost\n\nBy default, no repo is allowed to be shown, even when the vhost has supplied the\n`repo_base_dir` config.\n\nYou can override this simply to get started by providing the vhost `.acl_user`\nname of \u0022@all\u0022 as the example code does. This will allow libjsongit2 to show\nthe contents of any repo in the `repo_base_dir`.\n\nFor a real server, libjsongit2 uses gitolite ACLs to control which vhosts\ncan see what. It's not uncommon for a server to have several HTTP vhosts, but\nonly a single system like gitolite handling repos in a single directory.\n\nSo it becomes important to restrict the view of the different vhosts to the\nrepos that are relevant to them. Rather than reinvent the wheel, libjsongit2\nlets you configure what it will show using gitolite config.\n\n\n\nIf the gitolite well-known repo `gitolite-admin` is present in the repo\ndirectory, it is parsed automatically using the vhost's `acl_user` to discover\nthe ACLs possible for this vhost.\n\nAdditionally, when creating the context for a specific transaction, you can\npass in an authorized username for the transaction using the `authorized`\nparameter in the context creation api. If non-NULL, this adds to the repos\nalready available from selecting using the vhost `acl_user` name.\n\n#### Allow gitolite to set repo gitweb config\n\nGitohashi acquires gitweb repo information from the bare repo config file, at\n`myrepo.git/config`. You can set these by hand using git config syntax if you\nwant, by adding a section like this...\n\n```\n[gitweb]\n description \u003d libwebsockets lightweight C networking library\n url \u003d https://libwebsockets.org/repo/libwebsockets\n owner \u003d Andy Green \u003candy@warmcat.com\u003e\n```\n\n...but if you are already using gitolite, rather than have to ssh in and edit\nthe bare repo config each time, it's much more convenient to define and manage\nthese in the same gitolite config file used for repo creation and ACLs already.\n\nGitolite supports it but to allow the gitolite config file to alter the bare\nrepo config, you must one-time whitelist the gitweb-related keys we want to\ncontrol from there in `.gitolite.rc` in your gitolite user home dir.\n\ngitolite v2.x\n```\n$GL_GITCONFIG_KEYS \u003d \u0022gitweb.description gitweb.owner gitweb.url\u0022;\n```\n\ngitolite v3.x\n```\n$GIT_CONFIG_KEYS \u003d \u0022gitweb.description gitweb.owner gitweb.url\u0022;\n```\n\nThen, in your usual gitolite config you can do this kind of thing\n\n```\nrepo libwebsockets\n RW+ \u003d @ag\n R \u003d v-lws\n config gitweb.description \u003d \u0022libwebsockets lightweight C networking library\u0022\n config gitweb.owner \u003d \u0022Andy Green andy@warmcat.com\u0022\n config gitweb.url \u003d \u0022https://libwebsockets.org/repo/libwebsockets\u0022\n```\n\nWhen you update the gitolite-admin remote repo, it will apply the defined\nconfig into the remote repos' config immediately. In pages rendered by\ngitohashi, the updated gitweb information will be reflected immediately.\n\n#### Set up per-vhost virtual users\n\nlibjsongit2 can understand gitolite ACLs for the repos. You can associate a\nlibjsongit2 vhost with a user name in your gitolite config, and that vhost will\nshow on the web any repo that the user name has access to.\n\nThe user name doesn't have to be a real user with ssh keys.\n\nEg, here we give the \u0022user\u0022 v-lws read access to `libwebsockets`...\n\n```\nrepo libwebsockets\n RW+ \u003d @ag\n R \u003d v-lws\n```\n\nif we tell the libjsongit2 vhost its acl-user is also `v-lws`, it will\nunderstand it should serve the `libwebsockets` repo and any other repos `v-lws`\nhas read access to.\n\nNo other repo will be opened by gitohashi for serving.\n\n","s":{"c":1743401518,"u": 652}}
],"g": 3653,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 1, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}