太令人沮丧了:我正在寻找一个基于 gitolite 的可管理的基于 Web 的解决方案。由于缺少或过时的 ruby 包,Redmine 一直失败。至少我尝试过使用 gitLab。我使用的最后一个指南是常规指南:
我一步一步地复制了每个点,但是没有办法执行无错误的设置:
这应该是最后的步骤之一:
sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production
但是输出告诉我用户“gitolite”(=git)不在 gitolite 组中以及如何解决这个问题:
Checking Environment ...
gitlab user is in gitolite group? ... no
Try fixing it: sudo usermod -a -G gitolite gitlabFor more information see: doc/install/installation.md in section "System Users"
Please fix the error above and rerun the checks. Has no "-e" in ~gitolite/.profile ... rake aborted!
No such file or directory - /var/lib/gitolite/.profile
/home/gitlab/gitlab/lib/tasks/gitlab/check.rake:320:in `read'
/home/gitlab/gitlab/lib/tasks/gitlab/check.rake:320:in
check_issue_1056_shell_profile_error' /home/gitlab/gitlab/lib/tasks/gitlab/check.rake:257:in
block (3 levels) in 'Tasks: TOP => gitlab:check => gitlab:env:check
(See full trace by running task with --trace
但是没有机会处理这个。输出保持不变。即使创建了管理员帐户,也无法启动 Web 服务器来管理该帐户。
一直都是“坏网关”
你知道怎么解决吗?或者您知道另一种基于 gitolite 的合适解决方案吗?
再次感谢!
最佳答案
这似乎是用户或权限问题。
您的/etc/passwd 文件和/etc/group 文件是否显示用户“git”?
> grep git /etc/passwd
git:x:....
> grep git /etc/group
git:x:....
如果在那里找不到用户或组,则它不存在。
在这种情况下,您必须确认您遵循了上述教程中提到的命令。
> sudo adduser \
--system \
--shell /bin/sh \
--gecos 'Git Version Control' \
--group \
--disabled-password \
--home /home/git \
git
您还必须具有创建此类用户的权限。
否则,在阅读文档后,您似乎正在设置 $PATH 以完成某些任务并为用户创建一个 .profile
文件。
确认行...
> sudo -u git -H sh -c 'printf "%b\n%b\n" "PATH=\$PATH:/home/git/bin" "export PATH" >> /home/git/.profile'
通过运行
创建正确的文件.profile
> sudo su git
> ls -lah /home/git/ | grep .profile
如果 grep 没有显示 .profile
文件,您可能需要确认您的用户是否具有创建该文件的正确权限。
关于基于gitolite的gitlab安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14141696/