Wednesday, 5 November 2014

Installing GitLab on 32-bit CentOS - Redis Permission Denied Issue

Installing GitLab on 64-bit Linux should be trivial, given that the deb/rpm packages are ready for 64-bit architecture. However, if you want to install it on a 32-bit Linux, there are quite a lot of issues you need to figure out manually.
I had the same issue and found this web site very useful. I was trying to install GitLab on a 32-bit CentOS (following this recipe). Every thing went fine, but when I was trying to access GitLab from browser, I was seeing a 500 server internal error. Checking the log files, I realised that the problem is with Redis component. The error message was:
Errno::EACCES (Permission denied - connect(2) for /var/run/redis/redis.sock)
Have seen some posts saying that updating redis should solve the problem, but that is also painful (given that I was using quite old version of a 32-bit CentOS). The simple solution is to edit the config file of redis (if you follow the above tutorial it will be /etc/redis.conf) and add this line to the end:
unixsocketperm 777

(My redis version was 2.4.10-1.el6)

Then enjoy your GitLab installation!

P.S. I also encountered a post installation problem, when cloning or pushing from/to server, an error message was appeared:
Check GitLab API access: /home/git/gitlab-shell/lib/gitlab_net.rb:122:in `read': No such file or directory @ rb_sysopen - /home/git/gitlab-shell/.gitlab_shell_secret (Errno::ENOENT)
Also the same error appears when you run gitlab-shell's check script (/home/git/gitlab-shell/bin/check). The silly solution is to create the required file in the shown path (ensure to set permissions and owenership of the file the git user).