Skip to main content
The REST API is now versioned. For more information, see "About API versioning."

Dependabot 비밀

Dependabot 비밀 API를 사용하면 조직 또는 리포지토리에 대한 Dependabot 비밀을 관리하고 제어할 수 있습니다.

Dependabot 비밀 API 정보

Dependabot 비밀 API를 사용하면 암호화된 비밀에 대한 정보를 만들고, 업데이트하고, 삭제하고, 검색할 수 있습니다. 암호화된 비밀을 사용하면 액세스 토큰과 같은 중요한 정보를 리포지토리, 리포지토리 환경 또는 조직에 저장할 수 있습니다. 자세한 내용은 “Dependabot에 대한 암호화된 비밀 관리”를 참조하세요.

이 API는 인증된 사용자 OAuth Apps 및 GitHub Apps에 사용할 수 있습니다. 액세스 토큰을 사용하려면 프라이빗 리포지토리의 경우 repo 범위가, 퍼블릭 리포지토리의 경우 public_repo 범위가 필요합니다. GitHub Apps이 API를 사용하려면 dependabot_secrets 권한이 있어야 합니다. 인증된 사용자는 비밀을 만들고 업데이트하거나 읽기 위해 리포지토리에 대한 협력자 액세스 권한이 있어야 합니다.

List organization secrets

다음에서 작동 GitHub Apps

Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the dependabot_secrets organization permission to use this endpoint.

매개 변수

Headers
Name, Type, Description
acceptstring

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
orgstringRequired

The organization name. The name is not case sensitive.

Query parameters
Name, Type, Description
per_pageinteger

The number of results per page (max 100).

Default: 30

pageinteger

Page number of the results to fetch.

Default: 1

HTTP 응답 상태 코드

상태 코드설명
200

OK

코드 샘플

get/orgs/{org}/dependabot/secrets
curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>"\ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/dependabot/secrets

Response

Status: 200
{ "total_count": 3, "secrets": [ { "name": "MY_ARTIFACTORY_PASSWORD", "created_at": "2021-08-10T14:59:22Z", "updated_at": "2021-12-10T14:59:22Z", "visibility": "private" }, { "name": "NPM_TOKEN", "created_at": "2021-08-10T14:59:22Z", "updated_at": "2021-12-10T14:59:22Z", "visibility": "all" }, { "name": "GH_TOKEN", "created_at": "2021-08-10T14:59:22Z", "updated_at": "2021-12-10T14:59:22Z", "visibility": "selected", "selected_repositories_url": "https://api.github.com/orgs/octo-org/dependabot/secrets/SUPER_SECRET/repositories" } ] }

Get an organization public key

다음에서 작동 GitHub Apps

Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the dependabot_secrets organization permission to use this endpoint.

매개 변수

Headers
Name, Type, Description
acceptstring

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
orgstringRequired

The organization name. The name is not case sensitive.

HTTP 응답 상태 코드

상태 코드설명
200

OK

코드 샘플

get/orgs/{org}/dependabot/secrets/public-key
curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>"\ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/dependabot/secrets/public-key

Response

Status: 200
{ "key_id": "0123456