Closed stephan-- closed 7 years ago
That's indeed wrong. In Gentoo (at least with this ebuild), Gitlab is installed in /opt/gitlab
and there should be no references to /home/git
, the default location for source-based installs.
Since I've installed Gitlab for the first time a few years ago, I haven't tested the fresh install since then. I'll see if I can find the error from the logs you provided. Thanks for reporting, I'll comment again later!
Not sure of course if this was right (just want to make it work asap) but i removed the former created git user (userdel) and re-created according to the howto in the gitlab gentoo wiki
useradd -m -s /bin/bash -c 'Git Version Control' -d /home/git git
echo 'export PATH=$(ruby -rubygems -e "puts Gem.user_dir")/bin:/usr/local/bin:$PATH' >> /home/git/.bashrc
Next the config told me that there is no "repositories" directory in /home/git which i then just created manually. Had also some permission problems here and there plus needed to create the pg_trgm extension in my psql gitlab db but now it seems to ok....at least the config step is done now without reporting any further error.
Ah, no, that's wrong :) The home dir of the "git" user should be /var/lib/git. That user is created by the dev-vcs/gitlab-shell ebuild.
If you can, try to delete the user "git" and re-emerge dev-vcs/gitlab-shell and www-apps/gitlab-ce.I hope this should initialize everything correctly.
Ok removed the git user and re-emerged dev-vcs/gitlab-shell. Starting gitlab produces the follwing error in the unicorn.stderr.log
I, [2017-04-01T18:58:14.837144 #7565] INFO -- : Refreshing Gem list
WARNING: This version of GitLab depends on gitlab-shell 5.0.0, but you're running Unknown. Please update gitlab-shell.
/opt/gitlab/config/initializers/6_validations.rb:6:in `realpath': No such file or directory @ realpath_rec - /home/git (Errno::ENOENT)
from /opt/gitlab/config/initializers/6_validations.rb:6:in `realpath'
from /opt/gitlab/config/initializers/6_validations.rb:6:in `find_parent_path'
from /opt/gitlab/config/initializers/6_validations.rb:34:in `block in validate_storages'
from /opt/gitlab/config/initializers/6_validations.rb:19:in `each'
from /opt/gitlab/config/initializers/6_validations.rb:19:in `validate_storages'
from /opt/gitlab/config/initializers/6_validations.rb:41:in `<top (required)>'
Output in the console is:
* Starting GitLab - Unicorn servers ...
master failed to start, check stderr log for details
* start-stop-daemon: failed to start `/usr/bin/bundle' [ !! ]
* Starting GitLab - Sidekiq
My passwd:
apache:x:81:81:added by portage for apache:/var/www:/sbin/nologin
redis:x:75:75:added by portage for redis:/var/lib/redis:/sbin/nologin
nullmail:x:88:88:added by portage for nullmailer:/var/nullmailer:/sbin/nologin
git:x:101:247:added by portage for gitlab-shell:/var/lib/git:/sbin/nologin
Checking the gentoo wiki they write something about a repos_path
/var/lib/gitlab-shell/config.yml
...
#repos_path: "/var/lib/git/repositories"
repos_path: "/home/git/repositories"
...
#auth_file: "/var/lib/git/.ssh/authorized_keys"
auth_file: "/home/git/.ssh/authorized_keys"
Was checking my config.yml (which i just created from the .example file...) and couldn't find this variable...Tried to add this variable for testing:
repos_path: "/var/lib/git/repositories"
... but wasn't changing anything...
This gitlab is really a huge beast...
More things i noticed: It seems there are some settings which needs to be changed in the /etc/gitlab/gitlab.yml:
This is prob. the reason why it was still searching for the /home/git/...
storages: # You must have at least a `default` storage path.
default:
#path: /home/git/repositories/
path: /var/lib/git/repositories/
The paths to shell needs to be changed i guess (otherwise /etc/init.d/gitlab check print some warnings/errors):
## GitLab Shell settings
gitlab_shell:
#path: /usr/share/gitlab-shell/
path: /var/lib/gitlab-shell/
#hooks_path: /usr/share/gitlab-shell/hooks/
hooks_path: /var/lib/gitlab-shell/hooks/
(Hopefully) last problems im trying to fix now (/etc/init.d/gitlab check):
Check GitLab API access: OK
Access to /var/lib/git/.ssh/authorized_keys: OK
Send ping to redis server: /usr/lib64/ruby/2.3.0/socket.rb:1207:in `__connect_nonblock': No such file or directory - connect(2) for /var/run/redis/redis.sock (Errno::ENOENT)
from /usr/lib64/ruby/2.3.0/socket.rb:1207:in `connect_nonblock'
Ok...all problems now solved i hope.
Problem was that redis was (default) configured for tcp. Switched it to sockets according to the example here. Additionally i changed the path to /var/run/redis/redis,sock with 777 permission. After these changes the /etc/init.d/gitlab check was passed (regards gitlab-shell) but next problem was sidekiq was now searching for redit via tcp what was of course working before.
Solution: Using a resque.yml in /etc/gitlab/. I just copied the example file, re-ran the gitlab check and finally all tests are passing.
uff...
Hi guys,
trying to install first time gitlab. Followed all steps in emerge info for a fresh install and now im stuck at emerging the config...There is indeed no /home/git directory.... Anyone a idea whats wrong here?