Hi all,

I am new to GIT world I need your help setting up  my GIT server, I
will tell you the steps I did then the issues I am facing:

1- I installed Apache2 on my suse 11.0 server
2- get curl source and build it
3- get git source and build it (with ./configure --with_curl) so it's
configured with curl
4- I make .conf file to my server, here is it's content

<VirtualHost my_IP>
        ServerAdmin git@localhost
        ServerName git-repositories
        DocumentRoot /srv/www/git/repositories/

        <Directory /srv/www/git/repositories/myrepo2.git>
                Allow from all
                Order allow,deny
                <Limit GET>
                        Require user afahmy
                </Limit>
                <Limit GET PUT POST DELETE PROPPATCH MKCOL COPY MOVE
LOCK UNLOCK>
                #Allow from all
                Dav on
                AuthType Basic
                AuthName "Access autho"
                AuthUserFile /srv/www/git/passwd.dav
                Require valid-user

                </Limit>
        </Directory>
        <Directory /srv/www/git/repositories/>
                Dav on
                AuthType Basic
                AuthName "Access autho"
                AuthUserFile /srv/www/git/passwd.dav
                Require valid-user
                Options +Indexes
        #       Options Indexes MultiViews
                AllowOverride None
                #Allow from all
                Order allow,deny
                Allow from all
                #<Limit GET>
                        #AuthType Basic
                        #AuthName "git repository read"
                        #AuthUserFile /export/home/git/htpasswd.git
                        #AuthGroupFile /export/home/git/htgroup.git
                        #Require user afahmy
                        #Require group MED-Read
                        #Require group reposAccess
                        #Require user afahmy


                #       Dav on
                #AuthType Basic
                #authName "webdav"
                #AuthUserFile /srv/www/git/passwd.dav
                #Require valid-user
                #</Limit>
                #<Limit GET PUT POST DELETE PROPPATCH MKCOL COPY MOVE
LOCK UNLOCK>
                        #AuthType Basic
                        #AuthName "git repository write"
                        #AuthUserFile /export/home/git/htpasswd.git
                        #AuthGroupFile /export/home/git/htgroup.git
                        #Require user afahmy
                        #Require group MED-Write
                        #Require group reposAccess
                        #Require user afahmy

                #Dav on
                #AuthType Basic
                #authName "webdav"
                #AuthUserFile /srv/www/git/passwd.dav
                #Require valid-user
                #</Limit>

        </Directory>

        Alias /webdav /srv/www/git/repositories
        <Location /webdav>
                Dav on
                AuthType Basic
                authName "webdav"
                AuthUserFile /srv/www/git/passwd.dav
                Require valid-user
        </Location>

        #<Directory /srv/www/git/>
        #       DAV On
        #       Options ExecCGI FollowSymLinks Indexes
        #       # Deny everyything here
        #       Deny from all
        #       AuthType Basic
        #       AuthName "git repository"
        #       AuthUserFile /export/home/git/htpasswd.git
        #        AuthGroupFile /export/home/git/htgroup.git
        #       #Require user afahmy
        #       Require group Admin
        #</Directory>

</VirtualHost>


Forgive me for the comments I just in try and error state

3- then in /srv/www/git/repositories/myrepo2 I has test.cpp

4- cd to myrepo2 and type
git init
git add test.cpp
git commit -a -m "cpp"

5-  git clone --bare myrepo2 myrepo2.git
 touch myrepo2.git/git-daemon-export-ok

6- git --bare update-server-info
 chmod a+x hooks/post-update.sample (internet instructions says hooks/
post-update  but I can find hooks/post-update.sample )



Then at client side
git clone http://server.com/myrepo2.git


I got it then for example

add new file test.h

then git add test.h
git commit -a -m "Header"

git push origin master


I got the following error:

Fetching remote heads...
  refs/
  refs/tags/
  refs/heads/
updating 'refs/heads/master'
  from 0000000000000000000000000000000000000000
  to   c051cc00bbcbd434e0596cd97a333f374040b854
    sending 2 objects
MKCOL c051cc00bbcbd434e0596cd97a333f374040b854 failed, aborting
(22/401)
Updating remote server info
fatal: git-http-push failed

I have many questions:

1- what's wrong?
2- in myrepo2.git, I acn't find test.cpp where should I find it?
3- I can't find /refs/heads/master created?

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to