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.
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?
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.