TroubleShoot GitLab Import Errors

CAR enables you to import scripts directly from your GitLab repository and automatically synchronize them when Auto Sync is enabled or when performing On-Demand Sync.

During these operations, errors may occur due to token issues, repository configuration, or script size limits.

For both Auto Sync and On-Demand Sync, a ⚠️ error icon appears next to the script name if a sync fails. Hover over the icon to view the detailed error message. The icon disappears automatically once the next successful sync occurs.

Below is the list of possible errors, their causes, and recommended actions. If issues still persist after taking the recommended actions, contact Qualys Support.

Import Script from GitLab: 401 UnauthorizedImport Script from GitLab: 401 Unauthorized

Error Message: Error in fetching scripts from GitLab repository.

Possible Cause: The access token provided while importing may be incorrect or expired.

Recommended Action:

  1. Log in to GitLab and navigate to Settings > Access Tokens.
  2. Copy your existing token and retry importing.
  3. If it still fails, generate a new token with read_repository scope and retry.

Contact Qualys support in the following scenarios:

  • The error continues after updating the token.
  • Unsure of correct token permissions. Sync is not resuming even after a valid token update.

Import Script from GitLab: 404 Not FoundImport Script from GitLab: 404 Not Found

Error Message: Error in fetching scripts from GitLab repository.

Possible Cause: The repository name, owner, branch, file/folder path, or repository URL entered during import is invalid, or the file has been deleted or moved.

Recommended Action:

  1. Verify the repository name, owner, branch, file/folder path, or URL in GitLab.
  2. Update incorrect details and retry the import.

Contact Qualys support in the following scenarios:

  • The file or repository exists, but the error persists.
  • Repository visibility or permission issues are suspected.

Import Script from GitLab: Script Size LimitImport Script from GitLab: Script Size Limit

Error Message: Error in fetching scripts from GitLab repository.

Possible Cause: The selected script exceeds the maximum supported file size of 500 KB.

Recommended Action:

  1. Reduce the script size in GitLab, for example, split large scripts into smaller files.
  2. Retry the import after reducing the file size.

Contact Qualys support in the following scenarios:

  • The file was reduced below 500 KB, but still fails to import.
  • Clarification is needed on supported script size limits.

Import Script from GitLab: Other ErrorsImport Script from GitLab: Other Errors

Error Message: Failed to fetch scripts from GitLab repository.

Possible Cause: Temporary network issues, GitLab downtime, or unknown system errors.

Recommended Action: Retry the operation after a few minutes.

Contact Qualys support in the following scenarios:

  • Repeated failures even when GitLab is reachable.
  • Consistent timeouts are observed.

Sync with GitLab (Auto Sync/On-Demand): 401 UnauthorizedSync with GitLab (Auto Sync/On-Demand): 401 Unauthorized

Error Message: 401 Unauthorized.

Possible Cause: The stored GitLab token used for sync has expired or been revoked.

Recommended Action:

  1. Navigate to the affected script in CAR.
  2. Select Quick Action > Modify GitLab Access Token.
  3. Update the token and wait for the next Auto Sync cycle, or retry On-Demand Sync.

Contact Qualys support in the following scenarios:

  • The error icon persists after the next sync cycle.
  • The token appears correct, but the sync still fails.

Sync with GitLab (Auto Sync/On-Demand): 404 Not FoundSync with GitLab (Auto Sync/On-Demand): 404 Not Found

Error Message: 404 Not Found.

Possible Cause: The linked GitLab file, folder, or branch has been deleted, renamed, or moved.

Recommended Action:

  1. Verify the file exists in GitLab.
  2. If moved or renamed, update the repository details in the script’s Edit Configuration (applicable for Unapproved scripts only).
  3. Wait for the next Auto Sync or retry On-Demand Sync.

Contact Qualys support in the following scenarios:

  • The file exists, but sync continues to fail.
  • Repository access or visibility issues are suspected.

Sync with GitLab (Auto Sync/On-Demand): Other ErrorsSync with GitLab (Auto Sync/On-Demand): Other Errors

Error Message: Failed to sync script from GitLab repository.

Possible Cause: Temporary network issues, GitLab downtime, or API rate limits.

Recommended Action:

  1. No immediate action needed. The issue will auto-resolve on the next sync cycle.
  2. Retry On-Demand Sync if needed.

Contact Qualys support in the following scenarios:

  • The error icon persists after multiple sync cycles.
  • Multiple scripts are continuously failing sync.