Skip to main content

Esta versão do GitHub Enterprise Server será descontinuada em 2026-08-25. Não há suporte para versões descontinuadas. Nenhum lançamento de patch será feito, mesmo para questões críticas de segurança. Para obter melhor desempenho, segurança aprimorada e novos recursos no GitHub Enterprise Server, consulte Overview do processo de atualização. Para obter ajuda com a atualização, entre em contato com o GitHub Enterprise Support.

Working with push protection from the REST API

Learn your options for unblocking your push to GitHub using the REST API if secret scanning detects a secret in the content of your API request.

Quem pode usar esse recurso?

Usuários com com acesso para gravação

About push protection from the REST API

Push protection prevents you from accidentally committing secrets to a repository by blocking pushes containing supported secrets.

The "Create a blob" and "Create or update file contents" endpoints in the REST API include push protection. See Pontos de extremidade da API REST para blobs Git and Endpoints da API REST para conteúdo de repositório.

If you make a request with these endpoints whose content includes a supported secret, the REST API will return a 409 error, indicating that a secret has been detected.

To resolve the error, you can either:

Further reading