首页 > gitlab-ce报错403问题求助

gitlab-ce报错403问题求助

系统环境描述

System information
System:     Ubuntu 14.04
Current User:   git
Using RVM:  no
Ruby Version:   2.1.5p273
Gem Version:    2.2.1
Bundler Version:1.5.3
Rake Version:   10.3.2
Sidekiq Version:3.3.0

GitLab information
Version:    7.8.1
Revision:   e2d785c
Directory:  /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL:        https://git.zhuima.com
HTTP Clone URL: https://git.zhuima.com/some-project.git
SSH Clone URL:  ssh://git@git.zhuima.com:10086/zhuima.git
Using LDAP: yes
Using Omniauth: no

GitLab Shell
Version:    2.5.4
Repositories:   /data/gitlab/data/repositories
Hooks:      /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git:        /opt/gitlab/embedded/bin/git

问题症状

每天总有一段时间会出现403的情况

拍错思路

1、日志中出现401、403状态吗

2、gitlab-rake gitlab:check发现的问题 [修复未能解决问题]

    zhuima-library / yii-framework ... no
      Try fixing it:
      sudo -u git -H bundle exec rake gitlab:satellites:create RAILS_ENV=production
      If necessary, remove the tmp/repo_satellites directory ...
      ... and rerun the above command
      For more information see:
      doc/raketasks/maintenance.md

3、网上的文档搜索相关文档

http://boardreader.com/thread/Gitlab_7_10_4_Forbidden_Error_56o55lX769.html
怀疑是rack_attack.rb文件的策略导致的,修改文件,重启不生效

unless Rails.env.test?
  Rack::Attack.throttle('protected paths', limit: 300, period: 1.seconds) do |req|
    if req.post? && req.path =~ paths_regex
      req.ip
    end
  end
end

其他

每次服务中断时间为1小时

该时间段内没有设置任务计划
gitlab是通过ladp进行账号验证的

想要的效果

1、如何禁用rack_attack.rb的策略
2、稳定的服务

盼有经验的大大能给出一个解决思路,谢谢!


问题已解决,详情请参考:http://www.178linux.com/7988

【热门文章】
【热门文章】