apache – Help set up Gitolite SSH + HTTP

Question:

ubuntu 14.04 server Everything works fine on SSH . HTTP needs to be configured

I do everything according to the manual http://gitolite.com/gitolite/ssh-and-http.html

At the top of the .gitolite.rc file added the line

$ENV{PATH} .= ":/home/git/bin";

After that I created folders

install -d -m 0755 -o git -g git /var/www/bin
install -d -m 0755 -o www-data-g www-data /var/www/git

Created a file gitolite-suexec-wrapper.sh along the path /var/www/bin contents

#!/bin/bash
#
# Suexec wrapper for gitolite-shell
#

export GIT_PROJECT_ROOT="/home/git/repositories"
export GITOLITE_HTTP_HOME="/home/git"

exec ${GITOLITE_HTTP_HOME}/gitolite-source/src/gitolite-shell

Added file 192.168.196.133 in folder /etc/apache2/sites-available/ content

<VirtualHost *:80>
    ServerName        192.168.196.133
    ServerAlias       git
    ServerAdmin       you@example.com

    DocumentRoot /var/www/git
    <Directory /var/www/git>
        Options       None
        AllowOverride none
        Order         allow,deny
        Allow         from all
    </Directory>

    SuexecUserGroup git git
    ScriptAlias /git/ /var/www/bin/gitolite-suexec-wrapper.sh/
    ScriptAlias /gitmob/ /var/www/bin/gitolite-suexec-wrapper.sh/

    <Location /git>
        AuthType Basic
        AuthName "Git Access"
        Require valid-user
        AuthUserFile /etc/apache/git.passwd
    </Location>
</VirtualHost>

Did

$ sudo a2ensite 192.168.196.133

Then added the www-data user to the git group

# sudo usermod -a -G git www-data

In the config file gitolite-admin/conf/gitolite.conf added R = daemon to the desired repository

repo    gitolite-admin
        RW+     =   admin
        R       =   daemon

repo    testing
        RW+     =   @all

After the done manipulations, I'm trying to clone the repository on the client

git clone http://192.168.196.133/gitolite-admin

Error

Cloning into 'gitolite-admin'...
fatal: repository 'http://192.168.196.133/gitolite-admin/' not found

cat /etc/group command shows

root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:syslog,gitroot
tty:x:5:
disk:x:6:
lp:x:7:
mail:x:8:
news:x:9:
uucp:x:10:
man:x:12:
proxy:x:13:
kmem:x:15:
dialout:x:20:
fax:x:21:
voice:x:22:
cdrom:x:24:gitroot
floppy:x:25:
tape:x:26:
sudo:x:27:gitroot
audio:x:29:
dip:x:30:gitroot
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
gnats:x:41:
shadow:x:42:
utmp:x:43:
video:x:44:
sasl:x:45:
plugdev:x:46:gitroot
staff:x:50:
games:x:60:
users:x:100:
nogroup:x:65534:
libuuid:x:101:
netdev:x:102:
crontab:x:103:
syslog:x:104:
fuse:x:105:
messagebus:x:106:
mlocate:x:107:
ssh:x:108:
landscape:x:109:
gitroot:x:1000:
lpadmin:x:110:gitroot
sambashare:x:111:gitroot
ssl-cert:x:112:
git:x:1001:www-data

Answer:

git clone http://192.168.196.133/gitolite-admin

judging by the given apache configuration, url should start with /git .

i.e. probably like this:

$ git clone http://192.168.196.133/git/gitolite-admin
Scroll to Top