github - 直接使用 source-repositories API 镜像 GitHub 存储库
问题描述
云控制台提供了一个用于从 GitHub 镜像存储库的界面。
当您使用此功能时,它会在可以从 API 读取的存储库上创建一个mirrorConfig 。然而,API 本身似乎没有提供写入此配置的方法。
尝试使用 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": "*****"
}
]
}
}
有没有办法在 Google Cloud Platform 中以编程方式创建镜像源存储库?
解决方案
不。
是答案:(
资料来源:George 上面的评论(谷歌云平台支持团队)
推荐阅读
- javascript - MongoDB在具有附加字段的对象数组上聚合$lookup
- python - Python - 同时在屏幕上的不同位置多次点击
- elasticsearch - Elasticsearch 预处理以删除空字段作为摄取的一部分
- java - 属性中的 Java 数组越界异常
- ios - 如何在 SwiftUI 中创建此视图?
- pandas - 如何将矩阵作为字符串转换为ndarray?
- python - 无法弄清楚为什么 soup.find_all() 返回一个空列表
- ruby-on-rails - 如何使用正则表达式从 Ruby 中的 str.scan 和 str.match 返回相同的结果
- python - 烧瓶注销特定用户的所有会话
- java - java DatagramSocket中如何发送对象不实现Serializable接口