The cloud console provides an interface for mirroring a repository from GitHub.
When you use this feature it creates a mirrorConfig on the repository which can be read from the API. The API itself however does not seem to provide a way to write to this config.
Example when trying to make a repository with a mirrorConfig
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"field": "repo.mirror_config",
"description": "mirror_config is a read-only field and must not be set"
}
]
},
{
"@type": "type.googleapis.com/google.rpc.RequestInfo",
"requestId": "*****"
}
]
}
}
Is there a way to programmatically create mirrored source repositories in Google Cloud Platform?
No.
Is the answer :(
Source: George's comment above (Google Cloud Platform Support team)