Skip to main content

Cette version de GitHub Enterprise Server ne sera plus disponible le 2026-08-25. Les versions abandonnées ne sont pas prises en charge. Aucune publication de correctifs n’est effectuée, même pour les problèmes de sécurité critiques. Pour de meilleures performances, une sécurité améliorée et de nouvelles fonctionnalités dans GitHub Enterprise Server, consultez Overview du processus de mise à niveau. Pour obtenir de l’aide sur la mise à niveau, GitHub Support Entreprise.

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.

Qui peut utiliser cette fonctionnalité ?

Utilisateurs avec accès en écriture

Dans cet article

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 Points de terminaison d’API REST pour les objets blob Git and Points de terminaison d’API REST pour les contenus du référentiel.

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