{"id":43822674,"url":"https://github.com/Lakr233/GitLab-License-Generator","last_synced_at":"2026-02-17T15:00:58.602Z","repository":{"id":103609897,"uuid":"451381919","full_name":"Lakr233/GitLab-License-Generator","owner":"Lakr233","description":"Generate GitLab License For Self-Hosted/Private Instances","archived":true,"fork":false,"pushed_at":"2024-12-06T01:56:57.000Z","size":64,"stargazers_count":393,"open_issues_count":0,"forks_count":150,"subscribers_count":23,"default_branch":"main","last_synced_at":"2025-07-25T22:43:41.186Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lakr233.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-01-24T08:39:52.000Z","updated_at":"2025-07-23T14:02:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"4d445086-7cff-427c-9dfe-340a21be3b9b","html_url":"https://github.com/Lakr233/GitLab-License-Generator","commit_stats":{"total_commits":61,"total_committers":11,"mean_commits":5.545454545454546,"dds":0.8032786885245902,"last_synced_commit":"91fa9434cae21edb660a1bef47ae36b7f203e2f8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Lakr233/GitLab-License-Generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lakr233%2FGitLab-License-Generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lakr233%2FGitLab-License-Generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lakr233%2FGitLab-License-Generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lakr233%2FGitLab-License-Generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lakr233","download_url":"https://codeload.github.com/Lakr233/GitLab-License-Generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lakr233%2FGitLab-License-Generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29548201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T14:33:00.708Z","status":"ssl_error","status_checked_at":"2026-02-17T14:32:58.657Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-06T02:00:29.838Z","updated_at":"2026-02-17T15:00:58.589Z","avatar_url":"https://github.com/Lakr233.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# GitLab License Generator\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"README.md\"\u003eEnglish\u003c/a\u003e |\n  \u003ca href=\"lang/README_FR.md\"\u003eFrançais\u003c/a\u003e |\n  \u003ca href=\"lang/README_RU.md\"\u003eRussian\u003c/a\u003e\n\u003c/p\u003e\n\n\u003c/div\u003e\n\n## Description\n\n**GitLab License Generator** This project generates a GitLab license for **development purposes**. If you encounter any problems, please troubleshoot them on your own.\n\n\u003e Last tested on GitLab v17.6.0-ee.\n\n## Principles\n\n### **src/generator.keys.rb**\n\nGitLab uses a public/private key pair to encrypt its license. The public key is shipped with the GitLab distribution, while the private key is kept secure. The license itself is simply a JSON dictionary. Since GitLab has made its code open-source, we can easily generate our own license.\n\n### **src/generator.license.rb**\n\nThe `lib` folder is extracted from GitLab's source code. It is used to build and validate the license. The script `src/generator.license.rb` loads this functionality.\n\n### **src/scan.features.rb**\n\nRemoved with a script to generate empty json file due to DMCA takedown request.\n\n~~Features are extracted from an object filled with constants. The most comprehensive plan for a license is **Ultimate**, but features like Geo Mirroring are not included in any standard plan. Therefore, we manually add these features.~~\n\n## Usage\n\n### Using Docker image (Zero setup)\n\nUsing this method license files are generated under `./license` directory\n\u003e Please note that in standard docker installations, owner of the files generated in license directory will be root\n\n#### Method (1): Pull image\n\n```bash\ndocker run --rm -it \\\n  -v \"./license:/license-generator/build\" \\\n  -e LICENSE_NAME=\"Tim Cook\" \\\n  -e LICENSE_COMPANY=\"Apple Computer, Inc.\" \\\n  -e LICENSE_EMAIL=\"tcook@apple.com\" \\\n  -e LICENSE_PLAN=\"ultimate\" \\\n  -e LICENSE_USER_COUNT=\"2147483647\" \\\n  -e LICENSE_EXPIRE_YEAR=\"2500\" \\\n  ghcr.io/lakr233/gitlab-license-generator:main\n```\n\n#### Method (2): Build image\n\n```bash\ngit clone https://github.com/Lakr233/GitLab-License-Generator.git\ndocker build GitLab-License-Generator -t gitlab-license-generator:main\ndocker run --rm -it \\\n  -v \"./license:/license-generator/build\" \\\n  -e LICENSE_NAME=\"Tim Cook\" \\\n  -e LICENSE_COMPANY=\"Apple Computer, Inc.\" \\\n  -e LICENSE_EMAIL=\"tcook@apple.com\" \\\n  -e LICENSE_PLAN=\"ultimate\" \\\n  -e LICENSE_USER_COUNT=\"2147483647\" \\\n  -e LICENSE_EXPIRE_YEAR=\"2500\" \\\n  gitlab-license-generator:main\n```\n\n### Manual: Prerequisites\n\nBefore starting, ensure your environment is properly configured.\n\n#### 1. Install Ruby and gem\n\nTo run this project, you need **Ruby** and the **gem** package manager.\n\n- **On Linux (Ubuntu/Debian)**:\n\n  ```bash\n  sudo apt update\n  sudo apt install ruby-full\n  ```\n\n- **On macOS** (via Homebrew):\n\n  ```bash\n  brew install ruby\n  ```\n\n#### 2. Install Bundler and necessary gems\n\nAfter installing Ruby, you need to install **Bundler** to manage Ruby dependencies.\n\n```bash\ngem install bundler\n```\n\n#### 3. Install the `gitlab-license` gem\n\nThe project requires the `gitlab-license` gem, which will be automatically downloaded and used by the script.\n\n```bash\ngem install gitlab-license\n```\n\n### Steps to Generate the GitLab License\n\n#### 1. Clone the project repository\n\nClone this project to your local machine.\n\n```bash\ngit clone https://github.com/Lakr233/GitLab-License-Generator.git\ncd GitLab-License-Generator\n```\n\n#### 2. Run the `make.sh` script\n\nOnce all the prerequisites are met, run the script:\n\n```bash\n./make.sh\n```\n\nThe script will perform the following actions:\n\n- Download and extract the `gitlab-license` gem.\n- Copy and modify the required files.\n- Clone the GitLab source code from GitLab.com.\n- Generate a public/private key pair.\n- Generate a GitLab license.\n\n#### 3. Replace the public key in GitLab\n\nThe script generates a public key located in `build/public.key`. You need to replace GitLab’s existing public key with this newly generated one to ensure the license is accepted.\n\n- **If GitLab is installed on your server**:\n\n  ```bash\n  sudo cp ./build/public.key /opt/gitlab/embedded/service/gitlab-rails/.license_encryption_key.pub\n  sudo gitlab-ctl reconfigure\n  sudo gitlab-ctl restart\n  ```\n\n- **If GitLab is installed via Docker**:\n  Modify your `docker-compose.yml` file to mount the new public key inside the container:\n\n  ```yaml\n  volumes:\n    - \"./build/public.key:/opt/gitlab/embedded/service/gitlab-rails/.license_encryption_key.pub\"\n  ```\n\n  Then restart the container:\n\n  ```bash\n  docker-compose down\n  docker-compose up -d\n  ```\n\n#### 4. Install the license in GitLab\n\nOnce the public key is replaced, log in to GitLab’s admin interface to install the generated license.\n\n1. Log in to GitLab as an administrator.\n2. Navigate to the **Admin Area** from the bottom-left corner.\n3. Go to **Settings \u003e General** and upload the generated license file (`build/result.gitlab-license`).\n4. Check the **Terms of Service** checkbox and click **Add License**.\n\nIf necessary, you can directly access the license upload page via:\n\n```\n\u003cYourGitLabURL\u003e/admin/license/new\n```\n\n#### 5. Disable Service Ping (optional)\n\nIf you want to disable GitLab’s usage data collection (Service Ping), modify GitLab’s configuration file:\n\n- Open the configuration file:\n\n  ```bash\n  sudo nano /etc/gitlab/gitlab.rb\n  ```\n\n- Add the following line:\n\n  ```bash\n  gitlab_rails['usage_ping_enabled'] = false\n  ```\n\n- Reconfigure and restart GitLab:\n\n  ```bash\n  sudo gitlab-ctl reconfigure\n  sudo gitlab-ctl restart\n  ```\n\n### Troubleshooting\n\n- **HTTP 502 Error**:\n  If you encounter this error, wait for GitLab to finish starting up (it may take some time).\n\n## LICENSE\n\nThis project is licensed under the **WTFPL License**.\n\nCopyright (c) 2023, Tim Cook, All Rights Not Reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLakr233%2FGitLab-License-Generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLakr233%2FGitLab-License-Generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLakr233%2FGitLab-License-Generator/lists"}