# Troubleshooting

Here are some common issues that you may encounter when configuring and using Cover Pipeline for GitLab.

## **General**

Diffblue Cover performs a number of checks before, during, and after creating unit tests. Cover can generate a range of output codes during these checks to provide general information and highlight any issues. These codes and associated messages are output during the run, visible in the job output, and saved to the log files. See [Output Codes](/features/output-codes.md) for details.

For general Diffblue Cover issues, see the Cover CLI [Troubleshooting](/features/cover-cli/cover-cli-admin/troubleshooting.md) topic.

## Diffblue license issues

License issues are reported using [L - License Codes](/features/output-codes/l-license-codes.md). Common issues include:

* `L005 - The license has expired` - Update your license key (see [Configuration](/features/cover-pipeline/cover-pipeline-for-gitlab/configuration.md)) and/or contact [Diffblue Support](https://www.diffblue.com/support) for assistance.
* `L009 - License key not found` - Make sure you've entered the correct license key and in the format provided (see [Configuration](/features/cover-pipeline/cover-pipeline-for-gitlab/configuration.md)).

<figure><img src="/files/pS6okCfNvmTlEaEFSaae" alt=""><figcaption></figcaption></figure>

## Access token issues

Access token issues are reported using the `E120 - Git command failed` output code (see [E - Environment Codes](/features/output-codes/e-environment-codes.md)). For example:

* Access token with incorrect permissions. In this case, check that the access token has correct permissions for the project (`Developer` role, plus `api` and `write_repository` scopes/permissions) - see [Configuration](/features/cover-pipeline/cover-pipeline-for-gitlab/configuration.md).

```
INFO Pushing: 2023.11.02-RC2
ERROR E120: Git command failed
The following git command failed with an exit code of 128:
/usr/bin/git push origin HEAD:2023.11.02-RC2
Beginning of output
-------------------
> remote: You are not allowed to push code to this project.
> fatal: unable to access 'https://gitlab.com/diffblue-qa/DifferentialAnalysis.git/':
  The requested URL returned error: 403
```

* A mismatch of the access token name can lead to a Git error. GitLab requires the access token name used in the Cover Pipeline for GitLab integration to match the name of the access token in GitLab. Check and update your access token name as needed - see [Configuration](/features/cover-pipeline/cover-pipeline-for-gitlab/configuration.md).

<div align="left"><figure><img src="/files/ECx2PbNhJfoWTgRWlKPl" alt=""><figcaption></figcaption></figure></div>

## Diffblue Cover Docker issues

The Diffblue Cover docker image to use as part of your project pipeline is specified in your `.gitlab-ci.yml` file (see [Configuration](/features/cover-pipeline/cover-pipeline-for-gitlab/configuration.md)). Tag variations are provided for each supported JDK version (see <https://hub.docker.com/r/diffblue/cover-cli> for details). An error in the naming of the docker image will cause a failure to download the docker file:

<figure><img src="/files/YR7R7nLeTSqTyzg3hemH" alt=""><figcaption></figcaption></figure>

To resolve this issue, simply update the docker image name in your `.gitlab-ci.yml` file.

## No unit test changes

If no tests are created, updated, or removed as part of your merge request, you may have selected the **Diffblue Cover: Skip** label in the merge request. This label is used to mark a merge request as requiring no tests to be written. See [Configuration](/features/cover-pipeline/cover-pipeline-for-gitlab/configuration.md#labels).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cover-docs-preview.diffblue.com/features/cover-pipeline/cover-pipeline-for-gitlab/troubleshooting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
