Gitlab Composer Packages with Private Repositories

For those who use Composer to manage the dependencies of PHP projects, the goal usually is to add all the dependencies for a certain release version, for example: When using Gitlab with the self-managed version and with dependencies on private repositories, it is not possible to point to the release number or tag, but only to branch name. Despite having Googled this “problem” a few times, I never found the solution and then ended up using the name of the branches....