由于需要一些镜像等 gitlab 高级功能,所有破解gitlab ee版本。
你能信么? 这些破解方法来自官方自己的文档!
安装ruby
安装完gitlab ee之后
安装ruby:yum install ruby
ruby版本需要2.3或以上。
生成许可证
gem install gitlab-license
创建一个rb文件
license.rb
require "openssl"
require "gitlab/license"
key_pair = OpenSSL::PKey::RSA.generate(2048)
File.open("license_key", "w") { |f| f.write(key_pair.to_pem) }
public_key = key_pair.public_key
File.open("license_key.pub", "w") { |f| f.write(public_key.to_pem) }
private_key = OpenSSL::PKey::RSA.new File.read("license_key")
Gitlab::License.encryption_key = private_key
license = Gitlab::License.new
license.licensee = {
"Name" => "none",
"Company" => "none",
"Email" => "example@test.com",
}
license.starts_at = Date.new(2020, 1, 1) # 开始时间
license.expires_at = Date.new(2050, 1, 1) # 结束时间
license.notify_admins_at = Date.new(2049, 12, 1)
license.notify_users_at = Date.new(2049, 12, 1)
license.block_changes_at = Date.new(2050, 1, 1)
license.restrictions = {
active_user_count: 10000,
}
puts "License:"
puts license
data = license.export
puts "Exported license:"
puts data
File.open("GitLabBV.gitlab-license", "w") { |f| f.write(data) }
public_key = OpenSSL::PKey::RSA.new File.read("license_key.pub")
Gitlab::License.encryption_key = public_key
data = File.read("GitLabBV.gitlab-license")
$license = Gitlab::License.import(data)
puts "Imported license:"
puts $license
unless $license
raise "The license is invalid."
end
if $license.restricted?(:active_user_count)
active_user_count = 10000
if active_user_count > $license.restrictions[:active_user_count]
raise "The active user count exceeds the allowed amount!"
end
end
if $license.notify_admins?
puts "The license is due to expire on #{$license.expires_at}."
end
if $license.notify_users?
puts "The license is due to expire on #{$license.expires_at}."
end
module Gitlab
class GitAccess
def check(cmd, changes = nil)
if $license.block_changes?
return build_status_object(false, "License expired")
end
end
end
end
puts "This instance of GitLab Enterprise Edition is licensed to:"
$license.licensee.each do |key, value|
puts "#{key}: #{value}"
end
if $license.expired?
puts "The license expired on #{$license.expires_at}"
elsif $license.will_expire?
puts "The license will expire on #{$license.expires_at}"
else
puts "The license will never expire."
end
ruby license.rb
生成 GitLabBV.gitlab-license
license_key
license_key.pub
这三个文件。
使用许可证
用 license_key.pub
文件替换 /opt/gitlab/embedded/service/gitlab-rails/.license_encryption_key.pub
。
GitLabBV.gitlab-license
即是许可证,填入 ${address}/admin/license
地址并重启 gitlab-ctl restart
。
修改等级
--- /opt/gitlab/embedded/service/gitlab-rails/ee/app/models/license.rb
+++ /opt/gitlab/embedded/service/gitlab-rails/ee/app/models/license.rb
@@ -458,7 +458,7 @@
end
def plan
- restricted_attr(:plan).presence || STARTER_PLAN
+ restricted_attr(:plan).presence || ULTIMATE_PLAN
end
def edition
Gitlab添加许可证
14.x Gitlab之前添加许可证位置
菜单->管理员->订阅->许可证上传
新版Gitlab添加许可证的位置在
菜单->管理员->设置->通用->添加许可证处点击展开->点击上传
修改完成后使用 gitlab-ctl restart
重新加载配置。
菜单->管理员->订阅
在这里可以看到激活状态,上面操作没问题的话,这里可以看到激活成功!
参考
现在你已经破解好了Gitlab ee, 可以使用其中的高级功能。
更多的Gitlab ee详细教程,请参考下面的gitlab系列教程! 👇︎
系列教程
Gitlab 使用系列
Devops系列
- 自建全套开源Devops开发系统
- Git介绍以及分支模型图解
- 三万字无坑搭建基于Docker+K8S+GitLab/SVN+Jenkins+Harbor持续集成交付环境
- DevOps系列—【Jenkinsfile+Dockerfile+nginx+vue】
- 项目开发管理工具推荐
- Gitlab的安装及使用教程完全版
- Gitlab的安装及使用
- 那些有用的Github工具介绍!Action、app、workflow等
项目管理系列介绍锦集
快速全面的介绍现代企业中项目管理相关知识!

如何做一个完整的硬件项目的项目管理之简明教程
以一个硬件项目开发为例,介绍现代公司项目管理的一些基本工具和方法,给行业内外朋友一个初步印象,为广大从业者入门相关管理打下一个初步的,全局的基础!最后给出一个IPD端到端管理项目示例

PMBOK指南(第6版)
PMBOK 只是一套悬在空中的方法论,要想具体落地还需要具体的行业知识。两条腿,缺一不可!PMBOK 是基础中的基础知识,了解总是没有坏处的。是常识,不懂就没法做,但要做项目管理,光靠PMBOK远远不够。