Gitlab是一款开源的代码控制发布系统,类似于Github,可用于私人代码和中小型企业的代码管理。
以下是本人遇到的错误,以及各种解决方案,希望对大家有些帮助:
1.最好使用CentOS 6.4进行安装,5.x系列,太多依赖问题需要解决。
2.
ruby尽可能的使用rvm来安装:
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
source /etc/profile.d/rvm.sh
rvm install ruby-2.0.0-p247
3.
ERROR: Error installing charlock_holmes:
解决:
yum install libicu-devel
icu 版本4.2以上
4.
CentOS5 无法安装charlock_holem
https://github.com/brianmario/charlock_holmes/issues/37
5.权限问题:
Gitlab
Key的控制是每个用户登录时加Key
我用Admin登录加了Key 那这些Key的使用者就都是Admin的权限了
我应该用 A用户 B用户分别登录 然后上传自己的Key
再用web进行控制
6.502错误:
502
http://www.pwhack.me/archives/installation_of_gitlab.html
cp config/unicorn.rb.example config/unicorn.rb
bundle exec unicorn_rails -c config/unicorn.rb -E production -D
7.
/usr/local/lib/ruby/1.9.1/net/http.rb:799:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError
http://blog.csdn.net/csfreebird/article/details/8852305
两个条件:
1.self_signed_cert设置为true
2.url要用https
回到config.yml文件中,这样配置:
8.
出现read A hello错误
yum -y install libyaml
9.
Gitlab sidekiq 不启动:
bundle exec rake sidekiq:start RAILS_ENV=production
10.
remote权限:
chmod 777 /home/git/gitlab-shell/gitlab-shell.log
修改项目目录的权限 chown git:git
不能用其它的权限 必须是所属git 并且rw------
gitlab-shell reinstall
11.
Mail设置:
1.http://www.makebetterthings.com/git/gitlab-5-3-email-smtp-setup/
Just a heads up, in the newer versions you have to instead create
a script at: ‘/home/git/gitlab/config/initializers/smpt_settings.rb’
which you can base off of ‘/home/git/gitlab/config/initializers/smpt_settings.rb.sample’ (check the github repository at https://github.com/gitlabhq/gitlabhq/blob/master/config/initializers/smtp_settings.rb.sample if your version does not have it).
2.还需修改gitlab.yam中的Email setting
12.
看代码500错误
升级python -> 2.6 +
ruby的libyaml安装 然后重新编译安装ruby
13.
/home/git/gitlab/public/.html" failed (13: Permission denied)
chmod o+x /tmp/
将Nginx运行的用户加入git组
usermod -a -G git nginx
14.
页面图标不显示:
I did a
sudo -u git -H bundle exec rake assets:clean RAILS_ENV=production
sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
and the icons started appearing normally.