Organization の構成
REST API を使って、organization のプライベート レジストリの構成を管理します。
Note
REST API を使ってプライベート レジストリを管理する機能は、現在は パブリック プレビュー 段階であり、変更される可能性があります。
List private registries for an organization
Note
This endpoint is in public preview and is subject to change.
Lists all private registry configurations available at the organization-level without revealing their encrypted values.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
"List private registries for an organization" のきめ細かいアクセス トークン
このエンドポイントは、次の粒度の細かいトークンの種類で動作します:
粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:
- "Organization private registries" organization permissions (read)
"List private registries for an organization" のパラメーター
名前, Type, 説明 |
---|
accept string Setting to |
名前, Type, 説明 |
---|
org string 必須The organization name. The name is not case sensitive. |
名前, Type, 説明 |
---|
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." Default: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." Default: |
"List private registries for an organization" の HTTP 応答状態コード
状態コード | 説明 |
---|---|
200 | OK |
400 | Bad Request |
404 | Resource not found |
"List private registries for an organization" のコード サンプル
要求の例
curl -L \
-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/private-registries
Response
Create a private registry for an organization
Note
This endpoint is in public preview and is subject to change.
Creates a private registry configuration with an encrypted value for an organization. Encrypt your secret using LibSodium. For more information, see "Encrypting secrets for the REST API."
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
"Create a private registry for an organization" のきめ細かいアクセス トークン
このエンドポイントは、次の粒度の細かいトークンの種類で動作します:
粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:
- "Organization private registries" organization permissions (write)
"Create a private registry for an organization" のパラメーター
名前, Type, 説明 |
---|
accept string Setting to |
名前, Type, 説明 |
---|
org string 必須The organization name. The name is not case sensitive. |
名前, Type, 説明 |
---|
registry_type string 必須The registry type. Value: |
username string or null The username to use when authenticating with the private registry. This field should be omitted if the private registry does not require a username for authentication. |
encrypted_value string 必須The value for your secret, encrypted with LibSodium using the public key retrieved from the Get private registries public key for an organization endpoint. |
key_id string 必須The ID of the key you used to encrypt the secret. |
visibility string 必須Which type of organization repositories have access to the private registry. 次のいずれかにできます: |
selected_repository_ids array of integers An array of repository IDs that can access the organization private registry. You can only provide a list of repository IDs when |
"Create a private registry for an organization" の HTTP 応答状態コード
状態コード | 説明 |
---|---|
201 | The organization private registry configuration |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
"Create a private registry for an organization" のコード サンプル
要求の例
curl -L \
-X POST \
-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/private-registries \
-d '{"registry_type":"maven_repository","username":"monalisa","encrypted_value":"c2VjcmV0","key_id":"012345678912345678","visibility":"private"}'
The organization private registry configuration
Get private registries public key for an organization
Note
This endpoint is in public preview and is subject to change.
Gets the org public key, which is needed to encrypt private registry secrets. You need to encrypt a secret before you can create or update secrets.
OAuth tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
"Get private registries public key for an organization" のきめ細かいアクセス トークン
このエンドポイントは、次の粒度の細かいトークンの種類で動作します:
粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:
- "Organization private registries" organization permissions (read)
"Get private registries public key for an organization" のパラメーター
名前, Type, 説明 |
---|
accept string Setting to |
名前, Type, 説明 |
---|
org string 必須The organization name. The name is not case sensitive. |
"Get private registries public key for an organization" の HTTP 応答状態コード
状態コード | 説明 |
---|---|
200 | OK |
404 | Resource not found |
"Get private registries public key for an organization" のコード サンプル
要求の例
curl -L \
-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/private-registries/public-key
Response
Get a private registry for an organization
Note
This endpoint is in public preview and is subject to change.
Get the configuration of a single private registry defined for an organization, omitting its encrypted value.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
"Get a private registry for an organization" のきめ細かいアクセス トークン
このエンドポイントは、次の粒度の細かいトークンの種類で動作します:
粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:
- "Organization private registries" organization permissions (read)
"Get a private registry for an organization" のパラメーター
名前, Type, 説明 |
---|
accept string Setting to |
名前, Type, 説明 |
---|
org string 必須The organization name. The name is not case sensitive. |
secret_name string 必須The name of the secret. |
"Get a private registry for an organization" の HTTP 応答状態コード
状態コード | 説明 |
---|---|
200 | The specified private registry configuration for the organization |
404 | Resource not found |
"Get a private registry for an organization" のコード サンプル
要求の例
curl -L \
-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/private-registries/SECRET_NAME
The specified private registry configuration for the organization
Update a private registry for an organization
Note
This endpoint is in public preview and is subject to change.
Updates a private registry configuration with an encrypted value for an organization. Encrypt your secret using LibSodium. For more information, see "Encrypting secrets for the REST API."
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
"Update a private registry for an organization" のきめ細かいアクセス トークン
このエンドポイントは、次の粒度の細かいトークンの種類で動作します:
粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:
- "Organization private registries" organization permissions (write)
"Update a private registry for an organization" のパラメーター
名前, Type, 説明 |
---|
accept string Setting to |
名前, Type, 説明 |
---|
org string 必須The organization name. The name is not case sensitive. |
secret_name string 必須The name of the secret. |
名前, Type, 説明 |
---|
registry_type string The registry type. Value: |
username string or null The username to use when authenticating with the private registry. This field should be omitted if the private registry does not require a username for authentication. |
encrypted_value string The value for your secret, encrypted with LibSodium using the public key retrieved from the Get private registries public key for an organization endpoint. |
key_id string The ID of the key you used to encrypt the secret. |
visibility string Which type of organization repositories have access to the private registry. 次のいずれかにできます: |
selected_repository_ids array of integers An array of repository IDs that can access the organization private registry. You can only provide a list of repository IDs when |
"Update a private registry for an organization" の HTTP 応答状態コード
状態コード | 説明 |
---|---|
204 | No Content |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
"Update a private registry for an organization" のコード サンプル
要求の例
curl -L \
-X PATCH \
-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/private-registries/SECRET_NAME \
-d '{"username":"monalisa","encrypted_value":"c2VjcmV0","key_id":"012345678912345678"}'
Response
Status: 204
Delete a private registry for an organization
Note
This endpoint is in public preview and is subject to change.
Delete a private registry configuration at the organization-level.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
"Delete a private registry for an organization" のきめ細かいアクセス トークン
このエンドポイントは、次の粒度の細かいトークンの種類で動作します:
粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:
- "Organization private registries" organization permissions (write)
"Delete a private registry for an organization" のパラメーター
名前, Type, 説明 |
---|
accept string Setting to |
名前, Type, 説明 |
---|
org string 必須The organization name. The name is not case sensitive. |
secret_name string 必須The name of the secret. |
"Delete a private registry for an organization" の HTTP 応答状態コード
状態コード | 説明 |
---|---|
204 | No Content |
400 | Bad Request |
404 | Resource not found |
"Delete a private registry for an organization" のコード サンプル
要求の例
curl -L \
-X DELETE \
-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/private-registries/SECRET_NAME
Response
Status: 204