自 2024 年 6 月 17 日起,Cloud Source Repositories 将不再向新客户提供。如果您的组织之前未使用过 Cloud Source Repositories,则无法启用该 API 或使用 Cloud Source Repositories。未与组织相关联的新项目无法启用 Cloud Source Repositories API。2024 年 6 月 17 日之前使用过 Cloud Source Repositories 的组织不受此更改的影响。
删除代码库
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本主题介绍如何使用 Google Cloud 控制台或命令行删除代码库。
要删除代码库,请按照下列步骤操作。
控制台
在 Google Cloud 控制台中,为 Cloud Source Repositories 打开 所有代码库页面。
打开 Cloud Source Repositories
将指针放在要删除的代码库上,然后点击 设置 settings。
常规设置 页面打开。
点击 删除此代码库delete。
移除代码库 对话框打开。
输入您要删除的代码库的名称。
点击删除。
gcloud
在终端窗口中,输入以下命令:
gcloud init
gcloud source repos delete [REPOSITORY_NAME]
其中 [REPOSITORY_NAME]
是代码库的名称。
回答如下所示:
If [REPOSITORY_NAME] is deleted, the name cannot be reused for up to
seven days.
Delete "[REPOSITORY_NAME]" in project "gcloud-test" (Y/n)? y
Deleted [REPOSITORY_NAME].
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-01-30。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-01-30。"],[],[]]