# GitSource

- [JSON representation](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/GitSource#SCHEMA_REPRESENTATION)
- [DeveloperConnectConfig](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/GitSource#DeveloperConnectConfig)
  - [JSON representation](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/GitSource#DeveloperConnectConfig.SCHEMA_REPRESENTATION)

Defines how to access a Git source.

| JSON representation |
|---|
| ``` { "repo": string, "dir": string, "commitSha": string, "developerConnectConfig": { object (`https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/GitSource#DeveloperConnectConfig`) }, "refTag": string } ``` |

| Fields ||
|---|---|
| `repo` | `string` Required. Location of the git repo to build. |
| `dir` | `string` Optional. Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's `dir` is specified and is an absolute path, this value is ignored for that step's execution. |
| `commitSha` | `string` Output only. The commit SHA of the git repo deduced from given refTag. |
| `developerConnectConfig (deprecated)` | ``object (`https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/GitSource#DeveloperConnectConfig`)`` > [!WARNING] > This item is deprecated! Optional. This config defines the location of a source through Developer Connect. Used to access private git repos. |
| `refTag` | `string` Required. The reference tag of the git repo. |

## DeveloperConnectConfig

This config defines the location of a source through Developer Connect.

| JSON representation |
|---|
| ``` { "gitRepositoryLink": string } ``` |

| Fields ||
|---|---|
| `gitRepositoryLink` | `string` Required. The Developer Connect Git repository link, formatted as `projects/*/locations/*/connections/*/gitRepositoryLink/*`. |