DELETE
/orgs/{org}/agents/secrets/{secret_name}/repositories/{repository_id}Remove a repository from an organization secret
Removes a repository from the selected repository list for an organization secret. Use this operation only when the secret's visibility is set to selected, and authenticate with the required organization access. OAuth app tokens and classic personal access tokens require the admin:org scope, plus repo when the repository is private.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
orgstringrequired
The organization name; matching is not case sensitive.
secret_namestringrequired
The name of the organization secret to update.
repository_idintegerrequired
The unique numeric identifier of the repository to remove from the secret's selected list.
204Returns no content when the repository is removed from the secret's selected repository list.
409Returned when the organization secret's repository visibility is not set to `selected`.
Error handling
A 409 is returned when the secret's visibility is not set to selected. The authenticated user must have collaborator access to the repository, and OAuth app tokens or classic personal access tokens must include admin:org, plus repo for private repositories.