doc/user/duo_agent_platform/troubleshooting.md
If you are working with the GitLab Duo Agent Platform, you might encounter the following issues.
After a flow is created, you can view the flow's session by going to AI > Sessions.
The Details tab shows a link to the CI/CD job logs. These logs can contain troubleshooting information.
If you are trying to run a flow but it's not visible in the GitLab UI:
Ensure you have at least Developer role in the project.
Ensure GitLab Duo is turned on and flows are allowed to execute.
Ensure the group you are in has been given permission to use flows.
If the top-level group is configured correctly but flows are not visible for an individual project:
If it still does not work:
If you are trying to run foundational flows in an imported project or a project created from a template,
you might get the error: Error in creating workload: Insufficient permissions to create a new pipeline.
To fix this issue:
Your request was valid but Workflow failed to complete itFlows require the project repository to have at least one commit.
If you run a flow in a project with no commits, you get the error:
Your request was valid but Workflow failed to complete it. Please try again.
This error occurs because the flow cannot find the default branch in a repository with no commits.
To fix this issue, push an initial commit to the project before you run a flow.
For example, add a README.md file.
If a session for your flow does not start:
In the GitLab UI, foundational flows use a service account that:
Prerequisites:
To configure push rules for a project:
Find the email address associated with the service account:
duo-[flow-name]-[top-level-group-name].Allow the email address to push to the project:
Allow the duo/feature/ branch prefix:
^(duo/feature)/.*$To create push rules for the instance:
SSL certificate OpenSSL verify result: unable to get local issuer certificate (20)On GitLab Self-Managed instances that use custom or self-signed CA certificates, this message might display when GitLab Duo Agent Platform jobs fail during
the initial git clone (the get_sources phase).
This happens because GitLab Duo Agent Platform jobs set GIT_CONFIG_GLOBAL=/dev/null and GIT_CONFIG_NOSYSTEM=1
to harden the agent sandbox. These variables prevent Git from reading system and global configuration files.
This breaks the runner's mechanism for injecting CA certificate paths during get_sources.
CI/CD jobs that do not execute flows are not affected. This issue is specific to workload pipelines for the GitLab Duo Agent Platform.
To resolve this issue, in the config.toml file, set the GIT_SSL_CAINFO environment variable at the runner level,
and mount the CA certificate into the container:
[[runners]]
environment = ["GIT_SSL_CAINFO=/etc/gitlab-runner/certs/ca.crt"]
[runners.docker]
volumes = ["/path/to/your/ca-bundle.crt:/etc/gitlab-runner/certs/ca.crt:ro"]
Replace /path/to/your/ca-bundle.crt with the path to your CA certificate bundle on the runner host.
The file must be a PEM-formatted CA bundle that contains your root CA and any intermediate certificates.
You might expect to set this as a CI/CD variable, but custom CI/CD variables are
not available in GitLab Duo Agent Platform jobs.
You must use the runner's config.toml environment directive instead.
To connect GitLab Duo CLI to your GitLab instance over a custom CA, add NODE_EXTRA_CA_CERTS
to the same environment line:
[[runners]]
environment = [
"GIT_SSL_CAINFO=/etc/gitlab-runner/certs/ca.crt",
"NODE_EXTRA_CA_CERTS=/etc/gitlab-runner/certs/ca.crt"
]
[runners.docker]
volumes = ["/path/to/your/ca-bundle.crt:/etc/gitlab-runner/certs/ca.crt:ro"]
If the GitLab Duo CLI runs in the Anthropic Sandbox Runtime (SRT), runner environment variables might not reach it. If TLS errors persist after this change, in your agent-config.yml, in the setup_script, set NODE_EXTRA_CA_CERTS instead. The setup_script runs inside the container and is not filtered by the sandbox.
The GIT_SSL_CAINFO variable addresses Git operations that occur before the GitLab Duo CLI starts. For GitLab Duo CLI certificate configuration, see custom SSL certificates.
If you encounter an issue while working with the GitLab Duo Agent Platform in your IDE, start by ensuring that GitLab Duo is on and that you are properly connected.
For further support, see the troubleshooting page for your extension and IDE:
If you cannot identify the cause of a GitLab Duo Agent Platform issue from the related feature documentation, run the diagnostic script to check your configuration.
The script checks the full configuration chain required for GitLab Duo Agent Platform features:
gitlab--duo tag.[!warning] This script reads configuration data only and does not modify any settings. The output may contain internal configuration details. Sanitize the output before sharing it with support.
Prerequisites:
To run the diagnostic script in GitLab 19.0 or later:
Run the built-in gitlab:duo:verify_setup Rake task.
Replace <group/project> with the full path to the project, for example gitlab-org/gitlab.
For example:
sudo gitlab-rake "gitlab:duo:verify_setup[<group/project>]"
To run the diagnostic script in GitLab 18.8 to GitLab 18.11:
{{< tabs >}}
{{< tab title="Linux package (Omnibus)" >}}
Download verify_setup.rb.
Copy the verify_setup.rb file to your GitLab server.
Run the script.
Replace <group/project> with the full path to the project, for example gitlab-org/gitlab.
sudo gitlab-rails runner "load '/tmp/verify_setup.rb'; Gitlab::Duo::Administration::VerifySetup.new('<group/project>').execute"
{{< /tab >}}
{{< tab title="Docker" >}}
Download verify_setup.rb.
Copy the verify_setup.rb file into the container.
Run the script.
Replace <group/project> with the full path to the project, for example gitlab-org/gitlab.
docker cp verify_setup.rb <container-id>:/tmp/verify_setup.rb
docker exec -it <container-id> gitlab-rails runner \
"load '/tmp/verify_setup.rb'; Gitlab::Duo::Administration::VerifySetup.new('<group/project>').execute"
{{< /tab >}}
{{< tab title="Self-compiled (source)" >}}
Download verify_setup.rb.
Copy the verify_setup.rb file to your GitLab server.
Run the script from the GitLab application directory.
Replace <group/project> with the full path to the project, for example gitlab-org/gitlab.
sudo -u git bundle exec rails runner \
"load '/tmp/verify_setup.rb'; Gitlab::Duo::Administration::VerifySetup.new('<group/project>').execute"
{{< /tab >}}
{{< tab title="Helm chart (Kubernetes)" >}}
Download verify_setup.rb.
Copy the verify_setup.rb file into the toolbox pod.
Run the script.
Replace <group/project> with the full path to the project, for example gitlab-org/gitlab.
# Find the toolbox pod
kubectl get pods --namespace <namespace> -lapp=toolbox
kubectl cp verify_setup.rb <namespace>/<toolbox-pod-name>:/tmp/verify_setup.rb
kubectl exec -it <toolbox-pod-name> -- gitlab-rails runner \
"load '/tmp/verify_setup.rb'; Gitlab::Duo::Administration::VerifySetup.new('<group/project>').execute"
{{< /tab >}}
{{< /tabs >}}