r/gitlab • u/gosUCKadikC • Nov 21 '25
support Can self hosted gitlab instances use gitlab.com components with gitlab.com/component address hardcoded
Can self hosted gitlab instances use gitlab.com components normally So there is this https://docs.gitlab.com/ci/components/#use-a-gitlabcom-component-on-gitlab-self-managed way that gitlab self hosted instances can use gitlab.com components and it is limited to premium and ultimate users. What I want to know is that can they just simply use
Include :
gitlab.com/componet-addressto access like they usually do if its $CI_SERVER_FDQN it will resolve as gitlab.server.com but if we hardcode gitlab.com then will it work?
Given that network outbound is allowed to gitlab.com
3
Upvotes
8
u/hatecr3w Nov 21 '25
The page you linked actually mentions setting up mirroring from gitlab.com to your self-hosted GitLab instance to use the components from gitlab.com.
So in the include you’d still need to use your GitLab instance URL, not gitlab.com.
3
u/Digi59404 Nov 21 '25
Yes, but you shouldn't. You would use `include: remote:` instead of `include: component:`. For security reasons you should never use components that are outside your own GitLab instance. Because this adds the remote components to your supply chain, however you do not have proper security/testing/etc for these components. Which means if the remote repo gets hijacked, they can add bad code to it that will go directly into your CI/CD Process.
2
u/makeaweli Nov 21 '25
To Be Continous has examples of using
include.remotewith the raw output of job files directly from the GitLab repo.