Connect to GitLab
The GitLab connector gives a Digital Employee access to your GitLab projects within the scope that you select. After you connect the projects, conversations and long-running tasks can query project, code repository, commit, branch, merge request, and pipeline data from them. The connector can also perform write operations on the target GitLab, such as creating branches, committing changes, creating merge requests, and triggering pipelines.
How it works
The GitLab connector uses an environment agent to run the GitLab command-line interface (CLI) that is installed and authenticated on the bound machine. GitLab credentials stay on that machine — STAROps does not collect or store them, and you do not enter credentials when you configure the connector. Because the connector provides no credential input field, complete CLI authentication on the machine before you configure the connector.
The connector runs commands on the bound machine through the environment agent. Its capabilities match those of the CLI on the machine and the permissions of the CLI credentials. In addition to read operations, the connector supports write operations such as creating branches, committing changes, creating merge requests, and triggering pipelines.
Write operations take effect directly on the target GitLab, with the same effect as running the commands yourself on the machine. Whether they succeed depends on the permissions of the credentials on the machine. Before you let the Digital Employee perform write operations, verify parameters such as the project, branch, and changes one by one, and proceed with caution.
Choose an entry
The GitLab connector can be added from two entries: Code access and Pipeline. Both entries create the same connector type, and both can query the same data. The difference is the list that the connector belongs to and the diagnostics capabilities that the connector can load.
Code access — The procedure in this topic follows this entry.
Pipeline — A connector under this category can additionally load CI diagnostics capabilities to analyze pipeline failures. If you also need to access pipelines, add another connector of this type under the Pipeline category.
If you need both code and pipeline context, add the connector from one entry based on your primary purpose, or add one connector from each entry.
Prerequisites
An existing Digital Employee.
An environment agent that is created and bound to a machine, with the machine status Online. Each environment agent is bound to one machine.
The
bashcapability declared by the machine incapabilities.json. This declaration is written automatically when you enable the built-in bash capability by using the installation command.The GitLab CLI installed and authenticated on the machine. The machine must be able to reach the target GitLab service, whether the target is GitLab.com or a self-managed instance.
For information about activating an environment agent, connecting a machine, and declaring capabilities, see Environment agent. For information about installing and authenticating the GitLab CLI, see GitLab CLI in the GitLab official documentation.
The Digital Employee runs commands on the machine as the user who ran the installation command. Use a dedicated account with appropriate permissions.
Procedure
1. Open Code access
Click Settings > Connectors > Code access.
2. Select GitLab
Click Add code access.
Select GitLab.
Click Next.
3. Enter connector information
Connector ID — Uniquely identifies the connector and cannot be modified after creation. It must be 1 to 64 characters long, contain only lowercase letters, digits, and hyphens, start with a letter, and end with a letter or digit.
Name — Distinguishes connections in the list.
4. Select an environment agent
Select the environment agent that runs GitLab commands, and make sure that it has the bash capability.
If the selected environment agent is offline, you cannot continue. Restore the machine to the Online state before you proceed. For instructions, see Environment agent.
5. Configure Scope of interest
After you select an environment agent, Scope of interest appears. Use it to select the GitLab projects that this connector can access.
Search by name, select all projects, or specify several projects.
Confirm the selection and click Next.
The scope applies as follows:
Projects outside the scope do not appear in access results, even if the credentials on the machine have permissions for them.
If you select all projects, the accessible scope remains limited by the permissions of the credentials on the machine.
(Recommended) Specify projects by business line.
Before you let the Digital Employee perform write operations on the selected projects, review the caution in How it works.
6. Install Skills
Install starops-gitlab-operation, the GitLab operation Skill that this connector requires. If it is not installed, the Digital Employee cannot query the data listed in Available data in conversations and long-running tasks.
When you add the connector under the Pipeline category, you can optionally install starops-gitlab-ci-diagnosis to analyze pipeline failures.
7. Configure data modeling
Basic modeling — After the connector is created, the selected GitLab projects and their basic relationships are modeled.
Agentic relationship exploration — Optional. After basic modeling, this mode explores cross-source relationships with applications, infrastructure, observable data, and other sources. The exploration starts model sessions, and you are billed based on the selected model and actual usage.
8. Review and save
In Check and add, verify the Connector ID, environment agent, Scope of interest, installed Skills, and modeling configuration. Then click Save.
After you save, the system checks the connection status. If the status is not Succeeded, review the check items in Connection check.
Verification
Verify that the connector was added successfully:
Verify that the connector appears in the Code access list, and that its name, type (GitLab), status (Succeeded), environment agent, and Scope of interest match the configuration that you created.
Click View details and verify the environment agent and Scope of interest.
In a conversation, ask "What merge requests are there on GitLab now?" A passing result lists merge requests that belong to projects inside the configured Scope of interest. If the GitLab authentication status on the machine has expired, the response returns an authentication failure instead.
Connection check
The GitLab connector check covers the environment agent runtime and machine capabilities. It does not cover the authentication status of the GitLab CLI.
Check item | Description |
Runtime status | Whether the environment agent is online and can run commands on the bound machine. |
Machine capability | Whether the machine has declared the |
A Succeeded status indicates only that the environment agent and machine capabilities are available. If the GitLab authentication status on the machine has expired, the status can still display Succeeded, but queries in conversations return authentication failures.
Available data
After the connection succeeds, conversations and long-running tasks can query the following data:
Projects — Project lists and details, and code search across projects.
Code repositories — Directory trees and file content.
Commits and branches — Commit history, details of an individual commit, and branch lists.
Merge requests — Lists and details, code changes, commit records, and associated pipelines.
Pipelines — Pipeline lists and details, and the build jobs in a pipeline and their details.
The connector can also perform write operations on the target GitLab. For details and the associated caution, see How it works.
FAQ
The status is Succeeded, but no data can be read in conversations
Check the following in order:
Verify that the environment agent is Online.
Verify that the GitLab CLI on the machine is authenticated and that its authentication status has not expired.
In most cases, the authentication status on the machine has expired. Re-authenticate on the machine and try again. For instructions, see GitLab CLI. A Succeeded status does not confirm GitLab authentication. For what the check covers, see Connection check.
A conversation reports that the connection is refused or the port is unreachable
Self-managed GitLab instances often use a non-default protocol or port. Confirm on the machine that the GitLab CLI can access the target address. If the address is accessible only over HTTP or a specific port, use the configuration that works on the machine. For details about GitLab CLI configuration, see GitLab CLI.
Do I need to enter a GitLab token in the console?
No. The GitLab CLI uses the credentials stored on the machine. This is also why the connector requires the environment agent to remain online.
The connector can be added under both Code access and Pipeline. What is the difference?
Both entries create the same connector type. For the differences between the two entries and the diagnostics capabilities that each can load, see Choose an entry. For more information, see Connect to GitLab pipelines.