Code Monkey home page Code Monkey logo

gitlab-license-generator's Introduction

GitLab License Generator

This project aims to generate a GitLab License for development purpose. If you encounter any problem, please solve them yourself.

Last tested on GitLab v17.1.1-ee .

Principles

src/generator.keys.rb

The GitLab uses public/private key pair to encrypt the license. The public key is shipped with the GitLab distro and the private key is kept privately. The license it self is just a json dictionary. Since GitLab made their code open source, we can easily generate a license by our own.

src/generator.license.rb

The lib folder is extracted from GitLab's source. It is used for building and validating the license. Script src/generator.license.rb will load it.

src/scan.features.rb

The features is extracted from a object full of constant. The most powerful plan for a license is ultimate, but features like geo mirror is not included in any type of the plan. So here by we add them manually.

Usage

Follow the procedure below to generate and install a license for your development use.

Get License

GitHub Action

Navigate to GitHub Action to download an artifact.

make.sh

This script is only tested on macOS. To build on Linux or other platform, you need to setup ruby with gem.

Install Test Key

You will need to replace the public key shipped within GitLab distro. It is located at /opt/gitlab/embedded/service/gitlab-rails/.license_encryption_key.pub most of the time.

If you are using Docker, there is a easy way to do this.

image: "gitlab/gitlab-ee:latest"
# ...
volumes:
    - "public.key:/opt/gitlab/embedded/service/gitlab-rails/.license_encryption_key.pub"

Install License

See GitLab Document. Follow are part of the document.

  • Sign in to GitLab as an administrator.
  • On the left sidebar, expand the top-most chevron.
  • Select Admin Area.
  • Select Settings > General.
  • or entering the key.
  • Select the Terms of Service checkbox.
  • Select Add license.

In GitLab 14.7.x to 14.9.x, you can add the license file with the UI. In GitLab 14.1.x to 14.7, if you have already activated your subscription with an activation code, you cannot access Add License from the Admin Area. You must access Add License directly from the URL, /admin/license/new.

Disable Service Ping

Service Ping is a GitLab process that collects and sends a weekly payload to GitLab. The payload provides important high-level data that helps our product, support, and sales teams understand how GitLab is used.

See GitLab Document for details.

LICENSE

This project is licensed under the WTFPL License.

Copyrigth (c) 2023, Tim Cook, All Rights Not Reserved.

gitlab-license-generator's People

Contributors

lakr233 avatar gabrielecabrini avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.