Virtualmin & git integration

Posted by weby3456 on Server Fault See other posts from Server Fault or by weby3456
Published on 2011-05-30T10:45:04Z Indexed on 2012/11/09 23:05 UTC
Read the original article Hit count: 414

Filed under:
|
|
|

I've installed virtualmin on my VPS to manage my websites. It's working perfect and as expected nearly a year now. Recently I wanted to add some features to one of my sites, and I need git integration.

I've correctly installed git & gitweb on my server, and I can create repositories and watch them under http://sub.domain.com/git/gitweb.cgi Here is the current relevant directory tree:

/home/user/domains/sub.domain.com/public_html/git/

drwxr-sr-x user   user .
drwxr-x--- user   user ..
-rw-r--r-- user   user git-favicon.png
-rw-r--r-- user   user git-logo.png
-rwxr-xr-x user   user gitweb.cgi
-rw-r--r-- user   user gitweb.css
drwxrwx--- apache user reponame.git

/home/user/domains/sub.domain.com/public_html/git/reponame.git/

drwxrwx--- apache user .
drwxr-sr-x user   user ..
drwxrwx--- apache user branches
-rwxrwx--- apache user config
-rwxrwx--- user   user description
-rwxrwx--- apache user HEAD
drwxrwx--- apache user hooks
drwxrwx--- apache user info
drwxrwx--- apache user objects
drwxrwx--- apache user refs

But I have some questions:

  1. When I'm visiting http://sub.domain.com/git/gitweb.cgi, the owner is listed as 'Apache'. why? how can I change that?

  2. Usually, to create a new git repository, I'll do something like:

    $ mkdir proj
    $ cd proj
    $ git init
    Initialized empty Git repository in /home/user/proj/.git/
    // here I'm creating the files or copy them from somewhere else
    $ git add *.php
    $ git add README
    $ git commit -m 'initial version'
    

But after creating the repository in virtualmin, I can find a new dir named 'reponame.git' but not the '.git' dir. When I'm trying to run any git command (e.g. git status) I'm receiving "fatal: This operation must be run in a work tree". How can I work with that repository?

  1. Currently I need to explicitly grant access for users to be able to view the repositories via gitweb. How can I make certain repositories public?

© Server Fault or respective owner

Related posts about git

Related posts about webmin