Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits.
Request
Path Params
Responses
🟢200Response
application/json
Body
🟠404404
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'https://api.github.com/repos///branches//protection/required_signatures'