Reference documentation and code samples for the Google Cloud Gke Hub V1 Client class GitConfig.
Git repo configuration for a single cluster.
Generated from protobuf messagegoogle.cloud.gkehub.configmanagement.v1.GitConfig
Namespace
Google \ Cloud \ GkeHub \ ConfigManagement \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ sync_repo
string
The URL of the Git repository to use as the source of truth.
↳ sync_branch
string
The branch of the repository to sync from. Default: master.
↳ policy_dir
string
The path within the Git repository that represents the top level of the repo to sync. Default: the root directory of the repository.
↳ sync_wait_secs
int|string
Period in seconds between consecutive syncs. Default: 15.
↳ sync_rev
string
Git revision (tag or hash) to check out. Default HEAD.
↳ secret_type
string
Type of secret configured for access to the Git repo. Must be one of ssh, cookiefile, gcenode, token, gcpserviceaccount or none. The validation of this is case-sensitive. Required.
↳ https_proxy
string
URL for the HTTPS proxy to be used when communicating with the Git repo.
↳ gcp_service_account_email
string
The Google Cloud Service Account Email used for auth when secret_type is gcpServiceAccount.
getSyncRepo
The URL of the Git repository to use as the source of truth.
Returns
Type
Description
string
setSyncRepo
The URL of the Git repository to use as the source of truth.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getSyncBranch
The branch of the repository to sync from. Default: master.
Returns
Type
Description
string
setSyncBranch
The branch of the repository to sync from. Default: master.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getPolicyDir
The path within the Git repository that represents the top level of the
repo to sync. Default: the root directory of the repository.
Returns
Type
Description
string
setPolicyDir
The path within the Git repository that represents the top level of the
repo to sync. Default: the root directory of the repository.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getSyncWaitSecs
Period in seconds between consecutive syncs. Default: 15.
Returns
Type
Description
int|string
setSyncWaitSecs
Period in seconds between consecutive syncs. Default: 15.
Parameter
Name
Description
var
int|string
Returns
Type
Description
$this
getSyncRev
Git revision (tag or hash) to check out. Default HEAD.
Returns
Type
Description
string
setSyncRev
Git revision (tag or hash) to check out. Default HEAD.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getSecretType
Type of secret configured for access to the Git repo. Must be one of ssh,
cookiefile, gcenode, token, gcpserviceaccount or none. The
validation of this is case-sensitive. Required.
Returns
Type
Description
string
setSecretType
Type of secret configured for access to the Git repo. Must be one of ssh,
cookiefile, gcenode, token, gcpserviceaccount or none. The
validation of this is case-sensitive. Required.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getHttpsProxy
URL for the HTTPS proxy to be used when communicating with the Git repo.
Returns
Type
Description
string
setHttpsProxy
URL for the HTTPS proxy to be used when communicating with the Git repo.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getGcpServiceAccountEmail
The Google Cloud Service Account Email used for auth when secret_type is
gcpServiceAccount.
Returns
Type
Description
string
setGcpServiceAccountEmail
The Google Cloud Service Account Email used for auth when secret_type is
gcpServiceAccount.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Gke Hub V1 Client - Class GitConfig (1.0.6)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.6 (latest)](/php/docs/reference/cloud-gke-hub/latest/ConfigManagement.V1.GitConfig)\n- [1.0.5](/php/docs/reference/cloud-gke-hub/1.0.5/ConfigManagement.V1.GitConfig)\n- [0.10.0](/php/docs/reference/cloud-gke-hub/0.10.0/ConfigManagement.V1.GitConfig)\n- [0.9.5](/php/docs/reference/cloud-gke-hub/0.9.5/ConfigManagement.V1.GitConfig)\n- [0.8.2](/php/docs/reference/cloud-gke-hub/0.8.2/ConfigManagement.V1.GitConfig)\n- [0.7.1](/php/docs/reference/cloud-gke-hub/0.7.1/ConfigManagement.V1.GitConfig)\n- [0.6.3](/php/docs/reference/cloud-gke-hub/0.6.3/ConfigManagement.V1.GitConfig)\n- [0.5.6](/php/docs/reference/cloud-gke-hub/0.5.6/ConfigManagement.V1.GitConfig) \nReference documentation and code samples for the Google Cloud Gke Hub V1 Client class GitConfig.\n\nGit repo configuration for a single cluster.\n\nGenerated from protobuf message `google.cloud.gkehub.configmanagement.v1.GitConfig`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ GkeHub \\\\ ConfigManagement \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getSyncRepo\n\nThe URL of the Git repository to use as the source of truth.\n\n### setSyncRepo\n\nThe URL of the Git repository to use as the source of truth.\n\n### getSyncBranch\n\nThe branch of the repository to sync from. Default: master.\n\n### setSyncBranch\n\nThe branch of the repository to sync from. Default: master.\n\n### getPolicyDir\n\nThe path within the Git repository that represents the top level of the\nrepo to sync. Default: the root directory of the repository.\n\n### setPolicyDir\n\nThe path within the Git repository that represents the top level of the\nrepo to sync. Default: the root directory of the repository.\n\n### getSyncWaitSecs\n\nPeriod in seconds between consecutive syncs. Default: 15.\n\n### setSyncWaitSecs\n\nPeriod in seconds between consecutive syncs. Default: 15.\n\n### getSyncRev\n\nGit revision (tag or hash) to check out. Default HEAD.\n\n### setSyncRev\n\nGit revision (tag or hash) to check out. Default HEAD.\n\n### getSecretType\n\nType of secret configured for access to the Git repo. Must be one of ssh,\ncookiefile, gcenode, token, gcpserviceaccount or none. The\nvalidation of this is case-sensitive. Required.\n\n### setSecretType\n\nType of secret configured for access to the Git repo. Must be one of ssh,\ncookiefile, gcenode, token, gcpserviceaccount or none. The\nvalidation of this is case-sensitive. Required.\n\n### getHttpsProxy\n\nURL for the HTTPS proxy to be used when communicating with the Git repo.\n\n### setHttpsProxy\n\nURL for the HTTPS proxy to be used when communicating with the Git repo.\n\n### getGcpServiceAccountEmail\n\nThe Google Cloud Service Account Email used for auth when secret_type is\ngcpServiceAccount.\n\n### setGcpServiceAccountEmail\n\nThe Google Cloud Service Account Email used for auth when secret_type is\ngcpServiceAccount."]]