GitLab Self-Managed: Unauthorized Error While Executing steps in Component

I’m working with a self-managed GitLab Community Edition instance hosted on-premises. I’m currently trying to implement a GitLab component that utilizes GitLab steps to run some script files as part of the component execution.

However, I’m running into an issue: whenever I try to execute the steps portion of the component, I consistently get an unauthorized error.

Here’s what I’ve done so far:

Created a GitLab component with a valid .gitlab-ci.yml.

Added steps referencing another repo that contains some script files I want to run.

Tried configuring access tokens and adjusting visibility settings.

Problem: The issue seems to occur specifically at the point where the steps repository is invoked. It fails with an unauthorized error, and I can’t figure out if it’s due to token permissions, repo structure, CI job scope, or how I’m referencing the repo in the steps.

What I’m looking for: A working example or best practices for using steps in a GitLab component (especially in a self-managed setup).

Expected repo structure for both the component and the repo providing the steps.

Advice on the permissions or access tokens required to run steps across repos.

Any configuration examples that work for others on self-hosted GitLab setups.

Would really appreciate help from someone who’s made this work on a similar setup!

Thanks in advance :folded_hands: