6

I use gitolite to host my source code, and setup a website using gitweb to display all my projects. At the beginning, all projects are shown correctly via gitweb, however, after I modified one project and do a git push, it disappeared immediately from the project list.

Every project, whenever I do a git push on it, it will disappear from the project list of the gitweb. Then if I do a "git clone --bare" of that project and replace the original one, it will be back in the project again...

Anyone encounter the same problem?

p.s. I make a "git clone --bare" and do a "git push", then diff it with the original one, what I get is:

Only in test.git/objects: 86 Only in test.git/objects: af Only in test.git/objects: f4 Only in test.git/refs/heads: master

a new file with master's commit id is created.

Vincent
  • 63
  • 5

1 Answers1

4

It depends:

"disappear" means the authentication you did enter at the Apache level isn't one of the authorized reader.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • thanks for the hint, I changed the following option in ~/.gitolite.rc: $REPO_UMASK = 0022; # gets you 'rwxr-xr-x' to allow "other" user and group to read the repository and solve the problem :) – Vincent Mar 07 '11 at 06:06
  • @Vincent: according to https://github.com/sitaramc/gitolite/blob/pu/doc/gitolite.rc.mkd#_most_often_used_changed_variables, this would be because the user for the httpd process (Apache web server) isn't the one managing gitolite. It would be best to have the same user for both. – VonC Mar 07 '11 at 06:48
  • @VonC - I disagree that the web server should run as the owner of the repositories. If a vulnerability is found in gitweb.cgi, I want my infrastructure to protect me from repository corruption. It would be best NOT to have the same user, but to have the web server be part of a group that had read access to the repositories. – Graham Sep 25 '13 at 14:25
  • @Graham I agree with you. Two years after that answer, I still run environments as one user (because I don't have any right to create others, on the servers I have to operate), but you are right. – VonC Sep 25 '13 at 14:28