文档

创建代码库部署密钥

更新时间:

该接口用于在代码库中创建新的部署密钥

请求方式POST/api/v3/projects/[ProjectId]/keys

请求Action:CreateRepositoryDeployKey

请求参数:

参数名

类型

说明

是否必须

默认值

ProjectId

long

代码库 ID

请求body:

{
    "title": "string",
    "key": "ssh-rsa xxxx",
}

body参数说明:

参数名

类型

说明

是否必须

默认值

title

long

部署密钥标题

key

string

部署密钥

返回body

{
   "RequestId": "",
   "Success":true,
   "Result": {
  "Id": 100,
  "Title": "string",
  "Key": "ssh-rsa xxxxx",
  "FingerPrint": "xx:xx:xx:xx",
  "CreatedAt": "2020-11-13T10:50:32.167+08:00"
 }
}

返回结果说明:

参数名

类型

说明

Id

long

部署密钥 ID

Title

string

部署密钥标题

Key

string

部署密钥

FingerPrint

string

部署密钥指纹

CreatedAt

string

创建时间

  • 本页导读 (0)