3

Hi I have recently set up a git server for my stuff. and it is working ok,

I have installed gitweb which is also working fine.

Except for the fact I don't seem to have any control over which repo's are being shown; specifically I DO NOT want my gitosis-adimin.git to be shown.

Inside of this directory in the gitosis.conf i have set to the following /home/git/repositories/gitosis-admin.git/gitosis.conf

[gitosis]
gitweb = yes

[repo gitosis-admin]
gitweb = no

[group gitosis-admin]
writable = gitosis-admin
members = 111111@devbox

I had hoped that this would disable the web UI from displaying this .git

my gitweb.conf is as follows /etc/gitweb.conf

# path to git projects (<project>.git)
$projectroot = "/home/git/repositories";
# directory to use for temp files
$git_temp = "/tmp";
# target of the home link on top of all pages
#$home_link = $my_uri || "/";
# html text to include at home page
$home_text = "indextext.html";
# file with project list; by default, simply scan the projectroot dir.
$projects_list = $projectroot;
# stylesheet to use
$stylesheet = "gitweb.css";
# javascript code for gitweb
$javascript = "gitweb.js";

I'm really not sure how to disable it from showing this information.

Thank You

knittl
  • 246,190
  • 53
  • 318
  • 364
111111
  • 15,686
  • 6
  • 47
  • 62

1 Answers1

4

You can either set $projects_list to point to a file containing a list of repositories and owners (see the gitweb INSTALL file for more information, note that unless you set $strict_export, these are still accessible), or you can set $strict_export and set $export_ok to a file name that should exist in the repository's .git directory if you want it to be accessible.

Hasturkun
  • 35,395
  • 6
  • 71
  • 104
  • thanks your reply. what is the purpose the line gitweb = no|yes in the gitosis file if not to control whether or not to display the file? Also I am struggling, I am unable to find what format the the $project_list file should be in, I tried pointing it at gitosis-admin.conf but that just broke gitweb (404). The install script didn't seem to help me out much either. thanks again – 111111 Jun 19 '11 at 15:38
  • @111111: gitosis should generate the project_list file (specified in your configuration) based on the `gitweb = yes` settings, so simply set this to a writable file and rerun gitosis. see the [gitosis README](http://eagain.net/gitweb/?p=gitosis.git;a=blob;f=README.rst;hb=master) for some more information. – Hasturkun Jun 19 '11 at 15:48
  • OK so the file now exists (it always did, my bad) however it is empty, i have however pointed the the gitweb $project_list at it. You say I need to gitosis, there is no one program on my machine called gitosis (gitosis-init, gitosis-run-hook, gitosos-serve). Those readme are sending me round in circles, it doesn't tell me how to rerun gitosis. Thanks – 111111 Jun 19 '11 at 16:05
  • @111111: Sorry, haven't used gitosis before, is apparently run by committing the changes to gitosis.conf and pushing, so should work if you do that. – Hasturkun Jun 19 '11 at 16:26
  • Thanks I got it in the end, I was expecting to do more manual work than required, and the error reporting from gitweb is not as good as perhaps it could be. Those in conjunction with being very tired confused the fuzz out of me. Basically, when I pointed gitweb at project.list it gave me a 404, this was actually correct. what i hadn;t tried was enable web access to an existing repo, if i had it would of shown up. Thanks for all your help – 111111 Jun 19 '11 at 16:43