Skip to main content

Diese Version von GitHub Enterprise Server wird eingestellt am 2026-08-25. Nicht mehr unterstützte Versionen werden nicht unterstützt. Es wird keine Patch-Freigabe vorgenommen, auch nicht für kritische Sicherheitsprobleme. Eine bessere Leistung, verbesserte Sicherheit und neue Features in GitHub Enterprise Server finden Sie unter Overview des Upgradeprozesses. Wenden Sie sich bei Fragen zum Upgrade an den 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.

Wer kann dieses Feature verwenden?

Benutzer*innen mit Schreibzugriff

In diesem Artikel

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 REST-API-Endpunkte für Git-BLOBs and REST-API-Endpunkte für Repositoryinhalt.

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:

  • Remove the secret from the content of your API request before trying again.
  • Create a push protection bypass: You can bypass push protection using the "Create a push protection bypass" endpoint. For more information, see REST-API-Endpunkte für das Secret Scanning.

Further reading