1、第一种(删除redis记录只能解决燃眉之急)
/opt/gitlab/embedded/bin/redis-cli -s /var/opt/gitlab/redis/redis.socket keys '*' | grep 'rack::attack' | xargs /opt/gitlab/embedded/bin/redis-cli -s /var/opt/gitlab/redis/redis.socket DEL
2、第二种(建议使用这种)
vim /etc/gitlab/gitlab.rb
gitlab_rails['rack_attack_git_basic_auth'] = {
'enabled' => true,
'ip_whitelist' => ["127.0.0.1","192.168.1.132"],
'maxretry' => 1000,
'findtime' => 5,
'bantime' => 20
}
gitlab-ctl reconfigure