az repos import
Note
此参考是 Azure CLI(版本 2.30.0 或更高版本)的 azure-devops 扩展的一部分。 该扩展会在首次运行 az repos import 命令时自动安装。 了解更多关于扩展的信息。
管理 Git 存储库导入。
此命令将公共存储库 fabrikam-open-source 导入到默认配置的空 Git 存储库 fabrikam-open-source。
命令
| 名称 | 说明 | 类型 | Status |
|---|---|---|---|
| az repos import create |
创建 git 导入请求。 |
Extension | GA |
az repos import create
创建 git 导入请求。
az repos import create --git-source-url --git-url
[--detect {false, true}]
[--git-service-endpoint-id]
[--org --organization]
[--project]
[--repository]
[--requires-authorization]
[--user-name]
必需参数
源 git 存储库的 URL。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
自动检测组织。
| 属性 | 值 |
|---|---|
| 接受的值: | false, true |
用于连接到外部终结点的服务终结点。
Azure DevOps 组织 URL。 可以使用 az devops configure -d organization=ORG_URL 配置默认组织。 如果未配置为默认或通过 git 配置选取,则为必需。示例:https://dev.azure.com/MyOrganizationName/。
项目的名称或 ID。 可以使用 az devops configure -d project=NAME_OR_ID 配置默认项目。 如果未配置为默认或通过 git 配置进行选取,则为必需。
要在其中创建导入请求的存储库的名称或 ID。
指示源 git 存储库是否为专用的标志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
如果源 git 存储库是专用的,则用户名。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |