Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I try to install gitolite3 with ssh and http.

I have followed largely the official guide at gitolite3, but I am stumbling accross three remaining problems.

  1. When I $ git clone http://florian@server/git/testing, this correctly creates the repo. I add and commit a new text file, then $ git push http://florian@server/git/testing. The thing then is, it only gives me a message:

    Everything up-to-date
    

    This is odd. I $ rm -rf testing, clone the repo again, and my text file isn't there. It seems reading is fine, but writing gets lost somewhere. There is nothing suspicious in neither the /etc/httpd/logs/ suexec.log, error_log, access_log, they all indicate a successful user authentication and connection. Also, the contents of ./gitolite-admin/conf/gitolite.conf for testing is:

    repo testing
        RW+     =   @all
        RW+     =   daemon
    

    Although the official guide at gitolite3 did not say anything about adding W+ for the testing repo. I am a bit dumbfounded, where should I look to get pushing over http working?

  2. To get this far, I had to echo 0 > /selinux/enforce (disable selinux), which I want to reenable again. After re-enabling, the httpd error_log has the following lines every time I try the above $ git clone http://florian@server/git/testing, and the command itself fails (of course):

    [Sun Aug 04 00:19:34 2013] [error] [client 10.42.43.1] FATAL: errors found but logfile could not be created
    [Sun Aug 04 00:19:34 2013] [error] [client 10.42.43.1] FATAL: /var/lib/gitolite3/.gitolite/logs/gitolite-2013-08.log: Permission denied
    [Sun Aug 04 00:19:34 2013] [error] [client 10.42.43.1] FATAL: warn\tUse of uninitialized value $rc{"UMASK"} in umask at /usr/share/gitolite3/gitolite-shell line 95, <DATA> line 1.<<newline>>
    [Sun Aug 04 00:19:34 2013] [error] [client 10.42.43.1] Premature end of script headers: gitolite-suexec-wrapper.sh
    

    ...So Im running now into selinux difficulties. Running the following line reveals:

    # ll -Z /var/lib/gitolite3/.gitolite/logs/gitolite-2013-08.log 
    -rw-rw-rw-. gitolite3 gitolite3 unconfined_u:object_r:gitosis_var_lib_t:s0 /var/lib/gitolite3/.gitolite/logs/gitolite-2013-08.log
    

    ...Which puzzles me even more. I am aware that gitolite3 is following gitosis, it seems that my OS CentOS6.4 is actually doing a quick fix with labelling file contexts with old gitosis labels rather than new gitolite ones. Fair enough, but now I want to ask the community what any best practice is here, and which permissions I should enable to resolve this access problem?

I'm sorry if these are a lot of question(s), I had not known installing gitolite3 was not so straightforward for http. But I'm committed to get this up and going, and I know it's not that far to get there anymore.

share|improve this question
    
Are you still working on this? –  dawud Aug 27 '13 at 19:39
    
No I resolved it in the meantime. I can't remember which and ahow, I had to fix the SELinux labels, and there was also a SUExec problem requiring the user and group an ID higher than 500. –  Florian Mertens Aug 30 '13 at 19:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.