Virtualmin Git Module

4 posts / 0 new
Last post
#1 Fri, 08/09/2013 - 21:42
ppsreejith

Virtualmin Git Module

I installed the git repository module as was given in the tutorial page. However I ran in to a lot of problems.

  1. The mydomain.com/git/something.git would always show 403 forbidden error despite the number of repositories I make.

  2. I follow the instructions to clone to a local repository but I just can't seem to push back after an initial commit. It always says git-push-http error, code 22.

Please Help! Time taken inversely proportional to my hair count. Thanks.

Mon, 09/23/2013 - 05:32
lulatsch66

Had the same problem, at least the following changes worked for me:

  1. after creating the repo, check the file gitweb.cgi
  2. lines 49/50 should be corrected; once the git_base_url is correct, the "browse repository" button works ok, but there's no snapshot.cgi so the snapshots_url does not work. So - seems to be a bug in virtualmin-git, that git_base_url isn't correctly set, at least under Debian Wheezy.
  3. I had to change line 31 $gitbin to /usr/lib/git-core, as "/usr/bin/git-rev-list" was not found using "/usr/bin" default setting, perhaps related to Wheezy, too.
  4. the default gitweb.cgi used is /usr/share/webmin/virtualmin-git/gitweb.cgi.source.new, so I could change $gitbin there - I think these should be configurable options in virtualmin-git module (Feature Request!)
  5. the repo push error is a client issue, see: http://www.mkonrad.net/Blog/Git-over-HTTPWebDAV-A-solution-for-git-http-... using .netrc to store login resolves it

Falko

Sun, 01/12/2014 - 04:43
rapidwebs

i have also been experiencing issues with getting gitweb.cgi to work out of the box with its virtualmin module and counterpart;

i have filed a bug report (although, it may not be a bug?), https://sourceforge.net/p/webadmin/bugs/4341/

i followed the steps outlined above, and corrected the paths... after changing the apache directory permissions on the git directories to allow cgi execution, i could finally log in to these directories using the browser.

however, the CGI wrapper is throwing errors when attempting to perform any critical operations:

gitweb.cgi: Use of uninitialized value $epoch in gmtime at gitweb.cgi line 813., referer: https://website.com/git/gitweb.cgi?p=ispman.git;a=commit;h=
gitweb.cgi: Use of uninitialized value $epoch in addition (+) at gitweb.cgi line 823.,
gitweb.cgi: Use of uninitialized value $head in concatenation (.) or string at gitweb.cgi line 129.,
gitweb.cgi: Use of uninitialized value $head in concatenation (.) or string at gitweb.cgi line 130.,
what i extracted from the actual error reported on the page:
403 Forbidden - Invalid hash parameter.
403 Forbidden - Reading tree failed.
etc

considering i am still new to Git, and coming from SVN, i assume that although the gitweb.cgi wrapper is broken, WebDAV and remote authoring might still work- but i will have to do further testing. if this IS the case, i guess i could tell people that they can only create, delete, and change permissions on

not sure whether to remove Git support until things are fixed, or if there might some trivial fix in which i seem to be missing...

any help would be greatly appreciated! virtualmin is a great product, and integration with Git would be fantastic to offer my clients :)

thanks!

Sun, 01/12/2014 - 19:05
rapidwebs

solved:

okay so, after some hard work, i figured out a solution to my problems.

first, the solutions was to follow the steps outline above by : lulatsch66

Next, the Gitweb wrapper used by virtualmin seems to be possibly out of date;

Considering if gitweb was installed from the repository, the solution to fix gitweb.cgi was to copy the repository installed gitweb.cgi, including dependencies (files under ./static in the gitweb template directory) to the users ./git directory, fix permissions (both on the filesystem, and in the users .htaccess), and edit the cgi wrapper within respect to the changes normally made by virtualmin (specify repository path, etc)

after this, some final changes would be to edit /etc/gitweb.conf and comment out the project path directive, in order to always load this from the users configuration

note: on the client side (Windows), i also experience a problem with pushing anything to the repository. along side the suggested .netrc fix, it seems that sometimes there is a dependency issues, and libcurl-4.dll was missing, or was the wrong version. the solution for this is to add git to the PATH directive. if this does not help, try copying libcurl.dll to System32. you may also be able to simply rename libcurl.dll to libcurl-4.dll to in the git bin directory.

hope that this helps somebody! i will duplicate this post into my bug report so that we may get git working out of the box again!

Topic locked