Since GitLab’s license public and private keys are stored locally on the instance, you can directly bypass the authorization mechanism by modifying the private key.
Project address:
Running the script requires a local Ruby environment. It is recommended to save the generated output so it can be reused later.
Additionally, after replacing the files, you can use chattr +i to lock the files to prevent GitLab from quietly changing them back. Before each version update, you need to run chattr -i to unlock the files, and after the update, you must replace the files again and relock them.