CreateGitRepository - 创建Git仓库

创建仓库

接口说明

请确保在使用该接口前有操作 KMS secret 对应权限。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求参数

名称

类型

必填

描述

示例值

ClientToken

string

幂等 Token。

TF-CreateApplication-1647587475-84104b89-eba5-47a8-b2fd-807b8b7d

Platform

string

Git 平台

gitee

Owner

string

登录账户名

JJGGu

SourceRepoOwner

string

源仓库 owner,账户名称或者组织名称。当需要将源仓库复制到目标仓库时传入该值。

aliyun-computenest

SourceRepoName

string

源仓库名称,当需要将源仓库复制到目标仓库时传入该值。

test-repo

SourceRepoBranch

string

源仓库分支,当需要将源仓库复制到目标仓库时传入该值。

main

TargetRepoOwner

string

目标(新)仓库 owner,当传入 SourceRepoOwner 和 SourceRepoName 表示是从源仓库复制到目标仓库,否则仅新建目标仓库。

namexx

TargetRepoName

string

目标仓库名称

test-repo

IsPrivate

boolean

目标仓库是否设置为私有仓库

False

RegionId

string

地域 ID

cn-hangzhou

OrgId

string

组织 ID。

5ffd468b1e45db3c1cc26ad6

返回参数

名称

类型

描述

示例值

object

RequestId

string

请求 ID

AA9FA778-AE4B-55EC-81CC-C46BAF08A166

GitRepo

object

GitRepo 结构体

FullName

string

仓库全名

aliyun-computest/lingo

Description

string

仓库描述信息

Test parameter for security testing

HtmlUrl

string

仓库访问地址

https://github.com/alibaba/fastjson

IsPrivate

string

是否公开

False

示例

正常返回示例

JSON格式

{
  "RequestId": "AA9FA778-AE4B-55EC-81CC-C46BAF08A166",
  "GitRepo": {
    "FullName": "aliyun-computest/lingo",
    "Description": "Test parameter for security testing",
    "HtmlUrl": "https://github.com/alibaba/fastjson",
    "IsPrivate": "False"
  }
}

错误码

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情