Diagnose Git Sync Errors

Updated 2 weeks ago by Archana Singh

This topic helps you diagnose errors you might encounter during the Harness Git sync process. For example, when you sync a Harness Application or account with a Git repo, or when you sync an Application or Workflow in Git with Harness.

In this topic:

Git Sync

Harness enables you to use YAML for all your account and Application components and sync it with a Git repo. Errors can occur during the Git sync process. Harness captures and displays the errors to help you fix them. For more information on how Git sync works, refer Configuration as Code.

Review: Error Categories

The different error categories are:

  • Git to Harness Sync Errors
  • Harness to Git Sync Errors
  • Connectivity Issues

These error messages disappear from the list when the error in that file is resolved.

Git to Harness Sync Errors

You can find all the errors that you might run into while syncing your Git repo with Harness account under this category. Here are some of the possible reasons for Git to Harness errors:

  • Backend receives syntactically or semantically wrong input in the YAML file.
  • Harness is not able to find the dependent entity. For example, when you add a Workflow and Harness is not able to find the Service on which the Workflow depends.
  • The name of a YAML file changed (for example, a Cloud Provider name) and it is referenced in more than one file. If all the referenced files are not found it will lead to an error.

To fix the error, try one of the following:

  • Fix the YAML content in Git and commit.
  • Make the changes in the Harness Manager UI.

Harness to Git Sync Errors

You can find all the errors that you encounter while syncing your Harness account with your Git repo under this category. These errors occur while syncing Harness YAML with your Git repo for an entity.

To fix the error, try one of the following:

  • Make the entity change from the Harness Manager UI.
  • Fix from Git.

Connectivity Issues

All connection or network-related errors that occur during the Git Sync process appear under this category. Connectivity issues might occur because of the following reasons:

  • Harness Delegate cannot connect to the Git because of credential issues.
  • Connectivity issues between the Harness Delegate and Git repo.

Step: Diagnose Git to Harness Sync Errors

  1. Click Setup, and then click Configuration As Code.
  2. In the Errors tab, click Git → Harness.
  3. Errors are listed based on commit IDs or file names.
  • Select the Commits tab to list errors by commit IDs.
  • Select the Files tab to list errors by file name.
  1. Filter errors for a specific repository. Select a repo from the Select a repository drop-down to view repo specific errors.
  2. Click View details to see the details of the error encountered. You can see the complete path of the file where the error has occurred. It also specifies the type of change made to the file, for example, ADD, MODIFY, or DELETE.
The commit ID, commit message, file path, error message, and initial commit message are truncated. You can hover over the mouse to view the full message.

Here is a list of actions that you can perform under View Details:

  • Discard All: To discard all the error messages. The discarded messages disappear from the list and cannot be retrieved.
  • Discard: To discard the specific error message. The discarded message disappears from the list and cannot be retrieved.
  • View Content: To view the content of the YAML file.
  • Obsolete Error: Shows the original error when the commit was processed, but has a more recent failure in a later commit.
  • View Latest: Provides the detail of the latest error encountered in the file.

Step: Diagnose Harness to Git Sync Errors

  1. Click Setup, and then click Configuration As Code.
  2. In the Errors tab, click Harness → Git.

Step: Diagnose Connectivity Issues

  1. Click Setup, and then click Configuration As Code.
  2. In the Errors tab, click Connectivity Issues.


How did we do?